Skip to content

Commit

Permalink
🐛 (auth) Add custom oauth client id and secret params
Browse files Browse the repository at this point in the history
Closes #216
  • Loading branch information
baptisteArno committed Jan 6, 2023
1 parent 119f6dc commit 6cc3cbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/builder/src/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ if (isNotEmpty(process.env.CUSTOM_OAUTH_AUTHORIZATION_URL)) {
id: 'custom-oauth',
name: process.env.CUSTOM_OAUTH_NAME ?? 'Custom OAuth',
type: 'oauth',
clientId: process.env.CUSTOM_OAUTH_CLIENT_ID,
clientSecret: process.env.CUSTOM_OAUTH_CLIENT_SECRET,
authorization: process.env.CUSTOM_OAUTH_AUTHORIZATION_URL,
token: process.env.CUSTOM_OAUTH_TOKEN_URL,
userinfo: process.env.CUSTOM_OAUTH_USERINFO_URL,
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/docs/self-hosting/configuration/builder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/azure-
| Parameter | Default | Description |
| ------------------------------ | ------------ | ----------------------------------------------------------------------- |
| CUSTOM_OAUTH_NAME | Custom OAuth | Provider name. Is displayed in the sign in form. |
| CUSTOM_OAUTH_CLIENT_ID | -- | OAuth client ID. |
| CUSTOM_OAUTH_CLIENT_SECRET | -- | OAuth client secret. |
| CUSTOM_OAUTH_AUTHORIZATION_URL | -- | OAuth autorization URL (i.e. `https://kauth.kakao.com/oauth/authorize`) |
| CUSTOM_OAUTH_TOKEN_URL | -- | OAuth token URL (i.e. `https://kauth.kakao.com/oauth/token`) |
| CUSTOM_OAUTH_USERINFO_URL | -- | User info URL (i.e. `https://kapi.kakao.com/v2/user/me`) |
Expand Down

0 comments on commit 6cc3cbf

Please sign in to comment.