fix(auth): distinct login message for OAuth access_denied#2970
Closed
postoso wants to merge 1 commit into
Closed
Conversation
OAuth callbacks redirect denied/cancelled logins to /login?error=access_denied, but no auth.login.errors.access_denied translation key existed, so the frontend fell back to the generic "Unable to sign in" default. That is misleading for an explicit user/provider denial and can loop the user through retry. Add an access_denied key to all 23 locale files with a message that distinguishes cancellation/denial from infrastructure failures, and a test asserting the key exists, is distinct from default, and is present across every locale.
Collaborator
|
Thanks for the contribution, but I already created a pull request for this one. I would love it if you could actually have a look at that and tell me if it works for you. #2955 Closing for now as a dup. |
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.
Fixes #2956
OAuth callbacks redirect denied or cancelled logins to
/login?error=access_denied, but noauth.login.errors.access_deniedtranslation key existed. The frontend builds the i18n key asauth.login.errors.${error.toLowerCase()}, soaccess_deniedfell through to the generic "Unable to sign in" default, the same message shown for token or state failures. That is misleading for an explicit user or provider denial and can loop the user through retry.The change
access_deniedkey to all 23 locale files, with a message that distinguishes cancellation/denial from infrastructure failures.default, and is present across every locale.Notes
access_denied(lowercase, matching the OAuth error code), because the frontend lowercases the raw error before the lookup. No backend change is needed;mainalready routes the raw error through_get_oauth_redirect_error.Summary by cubic
Show a clear message when an OAuth login is cancelled or access is denied, instead of the generic failure text. This reduces confusion and prevents unnecessary retries.
auth.login.errors.access_deniedto all 23 locale JSON files with clear copy.default, and that login error structures matchen-US.Written for commit ec7547e. Summary will update on new commits.