Skip to content

Commit 7d6611e

Browse files
committed
Configurable OAuth Scopes via Environment Variables
1 parent 2027001 commit 7d6611e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ NEXTAUTH_CLIENT_SECRET="KEYCLOAK_SECRET"
1414
NEXTAUTH_SECRET="NEXTAUTH_SECRET"
1515
NEXTAUTH_ISSUER="http://localhost:8085/realms/orchestrator"
1616
NEXTAUTH_WELL_KNOWN_OVERRIDE="http://localhost:8085/auth/.well-known/openid-configuration"
17+
NEXTATHU_AUTHORIZATION_SCOPE="openid profile"
1718
NEXTAUTH_URL=http://localhost:3000/api/auth
1819

1920
# docker-compose variables

pages/api/auth/[...nextauth].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const wfoProvider: OAuthConfig<WfoUserProfile> = {
2121
wellKnown:
2222
process.env.NEXTAUTH_WELL_KNOWN_OVERRIDE ??
2323
`${process.env.NEXTAUTH_ISSUER || ''}/.well-known/openid-configuration`,
24-
authorization: { params: { scope: 'openid profile' } },
24+
authorization: { params: { scope: process.env.NEXTATHU_AUTHORIZATION_SCOPE ?? 'openid profile' } },
2525
idToken: true,
2626
checks: ['pkce', 'state'],
2727
userinfo: {

0 commit comments

Comments
 (0)