Skip to content

Commit 5add964

Browse files
authored
Merge pull request #453 from authorizerdev/feat-add-roblox-login
Add roblox login feature
2 parents 82f6397 + 4eb8ca0 commit 5add964

File tree

23 files changed

+504
-485
lines changed

23 files changed

+504
-485
lines changed

app/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"author": "Lakhan Samani",
1313
"license": "ISC",
1414
"dependencies": {
15-
"@authorizerdev/authorizer-react": "^1.3.1",
15+
"@authorizerdev/authorizer-react": "^1.3.2",
1616
"@types/react": "^17.0.15",
1717
"@types/react-dom": "^17.0.9",
1818
"esbuild": "^0.12.17",

app/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
# yarn lockfile v1
33

44

5-
"@authorizerdev/authorizer-js@^2.0.2":
6-
version "2.0.2"
7-
resolved "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-2.0.2.tgz"
8-
integrity sha512-YgCtpaBDGYGMUlINFsvGNJnBtbnFG2wo66xX2i6auop52oVmKimvLpzOx8306/YddCxWhg9FljyVMp88Mbnxyw==
5+
"@authorizerdev/authorizer-js@^2.0.3":
6+
version "2.0.3"
7+
resolved "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-2.0.3.tgz"
8+
integrity sha512-uencwr3Ea8mwfxVKDFf2ITRCRSmzvua+O2voRuiWQORtRQTgZQjkN3M+IEkEj+WP9M1iFIl+NDgzECsp8ptC/A==
99
dependencies:
1010
cross-fetch "^3.1.5"
1111

12-
"@authorizerdev/authorizer-react@^1.3.1":
13-
version "1.3.1"
14-
resolved "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-1.3.1.tgz"
15-
integrity sha512-X7vQMr5jtZ28z+YZOt5ISB3lOYXNszpLpWw4S6VNs7TLAd5/ZP2kPaSdDbUgIvQFyYy51DHQeGygOu3G1n0Mdw==
12+
"@authorizerdev/authorizer-react@^1.3.2":
13+
version "1.3.2"
14+
resolved "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-1.3.2.tgz"
15+
integrity sha512-3kMAygHBCa8Fc9Oo0lz1k88r+Pd6kx1PSn3NMYLwxQXy2jRt4xWn7iuGn+SDGFs3DzofaN71I61gRwQ+6dO1rw==
1616
dependencies:
17-
"@authorizerdev/authorizer-js" "^2.0.2"
17+
"@authorizerdev/authorizer-js" "^2.0.3"
1818
validator "^13.11.0"
1919

2020
"@babel/code-frame@^7.22.13":

dashboard/public/roblox.png

1.74 KB
Loading

dashboard/src/components/EnvComponents/OAuthConfig.tsx

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import {
1717
FaApple,
1818
FaTwitter,
1919
FaMicrosoft,
20-
FaTwitch, FaDiscord,
20+
FaTwitch,
21+
FaDiscord,
2122
} from 'react-icons/fa';
2223
import {
2324
TextInputType,
@@ -474,6 +475,47 @@ const OAuthConfig = ({
474475
/>
475476
</Center>
476477
</Flex>
478+
<Flex direction={isNotSmallerScreen ? 'row' : 'column'}>
479+
<Center
480+
w={isNotSmallerScreen ? '55px' : '35px'}
481+
h="35px"
482+
marginRight="1.5%"
483+
border="1px solid #3b5998"
484+
borderRadius="5px"
485+
>
486+
<img
487+
src="https://authorizer.dev/_next/image?url=%2Fimages%2Froblox.png&w=25&q=25"
488+
alt="Roblox"
489+
/>
490+
</Center>
491+
<Center
492+
w={isNotSmallerScreen ? '70%' : '100%'}
493+
mt={isNotSmallerScreen ? '0' : '3'}
494+
marginRight="1.5%"
495+
>
496+
<InputField
497+
borderRadius={5}
498+
variables={envVariables}
499+
setVariables={setVariables}
500+
inputType={TextInputType.ROBLOX_CLIENT_ID}
501+
placeholder="Roblox Client ID"
502+
/>
503+
</Center>
504+
<Center
505+
w={isNotSmallerScreen ? '70%' : '100%'}
506+
mt={isNotSmallerScreen ? '0' : '3'}
507+
>
508+
<InputField
509+
borderRadius={5}
510+
variables={envVariables}
511+
setVariables={setVariables}
512+
fieldVisibility={fieldVisibility}
513+
setFieldVisibility={setFieldVisibility}
514+
inputType={HiddenInputType.ROBLOX_CLIENT_SECRET}
515+
placeholder="Roblox Client Secret"
516+
/>
517+
</Center>
518+
</Flex>
477519
</Stack>
478520
</Box>
479521
</div>

dashboard/src/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const TextInputType = {
1414
MICROSOFT_CLIENT_ID: 'MICROSOFT_CLIENT_ID',
1515
MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID: 'MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID',
1616
TWITCH_CLIENT_ID: 'TWITCH_CLIENT_ID',
17+
ROBLOX_CLIENT_ID: 'ROBLOX_CLIENT_ID',
1718
JWT_ROLE_CLAIM: 'JWT_ROLE_CLAIM',
1819
REDIS_URL: 'REDIS_URL',
1920
SMTP_HOST: 'SMTP_HOST',
@@ -46,6 +47,7 @@ export const HiddenInputType = {
4647
TWITTER_CLIENT_SECRET: 'TWITTER_CLIENT_SECRET',
4748
MICROSOFT_CLIENT_SECRET: 'MICROSOFT_CLIENT_SECRET',
4849
TWITCH_CLIENT_SECRET: 'TWITCH_CLIENT_SECRET',
50+
ROBLOX_CLIENT_SECRET: 'ROBLOX_CLIENT_SECRET',
4951
JWT_SECRET: 'JWT_SECRET',
5052
SMTP_PASSWORD: 'SMTP_PASSWORD',
5153
ADMIN_SECRET: 'ADMIN_SECRET',
@@ -141,6 +143,8 @@ export interface envVarTypes {
141143
MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID: string;
142144
TWITCH_CLIENT_ID: string;
143145
TWITCH_CLIENT_SECRET: string;
146+
ROBLOX_CLIENT_ID: string;
147+
ROBLOX_CLIENT_SECRET: string;
144148
ROLES: [string] | [];
145149
DEFAULT_ROLES: [string] | [];
146150
PROTECTED_ROLES: [string] | [];

dashboard/src/graphql/queries/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export const EnvVariablesQuery = `
3939
MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID
4040
TWITCH_CLIENT_ID
4141
TWITCH_CLIENT_SECRET
42+
ROBLOX_CLIENT_ID
43+
ROBLOX_CLIENT_SECRET
4244
DEFAULT_ROLES
4345
PROTECTED_ROLES
4446
ROLES

dashboard/src/pages/Environment.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ const Environment = () => {
5959
MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID: '',
6060
TWITCH_CLIENT_ID: '',
6161
TWITCH_CLIENT_SECRET: '',
62+
ROBLOX_CLIENT_ID: '',
63+
ROBLOX_CLIENT_SECRET: '',
6264
ROLES: [],
6365
DEFAULT_ROLES: [],
6466
PROTECTED_ROLES: [],

server/constants/auth_methods.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ const (
2727
AuthRecipeMethodMicrosoft = "microsoft"
2828
// AuthRecipeMethodTwitch is the twitch auth method
2929
AuthRecipeMethodTwitch = "twitch"
30+
// AuthRecipeMethodRoblox is the roblox auth method
31+
AuthRecipeMethodRoblox = "roblox"
3032
)

server/constants/env.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ const (
126126
EnvKeyTwitchClientID = "TWITCH_CLIENT_ID"
127127
// EnvKeyTwitchClientSecret key for env variable TWITCH_CLIENT_SECRET
128128
EnvKeyTwitchClientSecret = "TWITCH_CLIENT_SECRET"
129+
// EnvKeyRobloxClientID key for env variable ROBLOX_CLIENT_ID
130+
EnvKeyRobloxClientID = "ROBLOX_CLIENT_ID"
131+
// EnvKeyRobloxClientSecret key for env variable ROBLOX_CLIENT_SECRET
132+
EnvKeyRobloxClientSecret = "ROBLOX_CLIENT_SECRET"
129133
// EnvKeyOrganizationName key for env variable ORGANIZATION_NAME
130134
EnvKeyOrganizationName = "ORGANIZATION_NAME"
131135
// EnvKeyOrganizationLogo key for env variable ORGANIZATION_LOGO

0 commit comments

Comments
 (0)