feat(auth0-nuxt): forward query params as authorization params on login#48
Open
frederikprijck wants to merge 1 commit into
Open
feat(auth0-nuxt): forward query params as authorization params on login#48frederikprijck wants to merge 1 commit into
frederikprijck wants to merge 1 commit into
Conversation
Pass through additional query parameters from the login route to the authorization request via authorizationParams, while filtering out returnTo, reserved OAuth parameters, and prototype-polluting keys.
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
authorizationParams, mirroring the behavior inauth0-express.scope,audience,redirect_uri,client_id,state,nonce,response_type,code_challenge,code_challenge_method), thereturnToparam, and prototype-polluting keys are filtered out before being passed through.This lets consumers initiate login with params like
organization,login_hint, orpromptby appending them to the login URL, e.g./auth/login?organization=org_123.Test plan
npm run test:unit— 47 tests pass, including 4 new cases:authorizationParamsreturnTo__proto__,constructor,prototype)npm run lintpasses