Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable OAuth Scopes via Environment Variables #26

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

torkashvand
Copy link
Contributor

Issue:
The authorization scopes for OAuth are currently hardcoded in the NextAuth.js configuration, limiting operational flexibility across different environments.

Link to the issue: workfloworchestrator/orchestrator-ui-library#1055

@@ -14,6 +14,7 @@ NEXTAUTH_CLIENT_SECRET="KEYCLOAK_SECRET"
NEXTAUTH_SECRET="NEXTAUTH_SECRET"
NEXTAUTH_ISSUER="http://localhost:8085/realms/orchestrator"
NEXTAUTH_WELL_KNOWN_OVERRIDE="http://localhost:8085/auth/.well-known/openid-configuration"
NEXTATHU_AUTHORIZATION_SCOPE="openid profile"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

authorization: { params: { scope: 'openid profile' } },
authorization: {
params: {
scope: process.env.NEXTATHU_AUTHORIZATION_SCOPE ?? 'openid profile',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEXTATHU -> NEXTAUTH?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@torkashvand torkashvand merged commit 5315b11 into main Apr 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants