fix: improve error messaging for invalid redirect_uri OAuth error#4
Open
quantcode-agent[bot] wants to merge 1 commit into1.xfrom
Open
fix: improve error messaging for invalid redirect_uri OAuth error#4quantcode-agent[bot] wants to merge 1 commit into1.xfrom
quantcode-agent[bot] wants to merge 1 commit into1.xfrom
Conversation
When OAuth fails with an invalid redirect_uri, users now see a helpful, actionable message that explains the issue and directs them to use the Manual Token option with a link to generate a personal access token. Closes #1
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
invalid_redirect_uriOAuth errors specifically (by checking the error code and description)Changes
src/Controller/OAuthController.phpuse Drupal\Core\Render\Markupimportstriposon error description + exact match on error code)Markup::create()to ensure the link renders as clickable HTMLAssumptions
erroranderror_description) as per OAuth 2.0 specinvalid_redirect_urior description containing "redirect_uri" are sufficient signals to detect this conditionhttps://dashboard.quantcdn.io/profileis the correct location for personal access token generationMarkup::create()is appropriate here since the URL is hardcoded (not user-supplied), so there's no XSS riskCloses #1