feature: add google.oauth.enabled flag and seed default roles for Google…#180
Open
abhigyan24-ops wants to merge 1 commit into
Open
feature: add google.oauth.enabled flag and seed default roles for Google…#180abhigyan24-ops wants to merge 1 commit into
abhigyan24-ops wants to merge 1 commit into
Conversation
Owner
|
Hi @abhigyan24-ops , Also add a flag in frontend side in login, when the flag is disable the google authenticaiton button should not be shown in UI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #45
Changes
1. google.oauth.enabled property flag
google.oauth.enabled=${GOOGLE_OAUTH_ENABLED:true}to bothapplication.propertiesandapplication-dev.propertiesGoogleAuthServicenow checks this flag at runtime and throws a clearBusinessExceptionif Google Auth is disabled, instead of failing silently2. DataInitializer — seed default roles on startup
DataInitializercomponent runs on startup viaCommandLineRunnerHow to enable/disable Google Auth
Set in environment or properties file:
GOOGLE_OAUTH_ENABLED=true→ Google login enabled (default)GOOGLE_OAUTH_ENABLED=false→ Google login disabled, returns 400 with clear messageHow to test
GOOGLE_OAUTH_ENABLED=false→POST /api/v1/auth/googlereturns 400GOOGLE_OAUTH_ENABLED=true+ validGOOGLE_OAUTH_CLIENT_ID→ Google login works