Skip to content

feat(auth0-nuxt): forward query params as authorization params on login#48

Open
frederikprijck wants to merge 1 commit into
mainfrom
worktree-pass-params
Open

feat(auth0-nuxt): forward query params as authorization params on login#48
frederikprijck wants to merge 1 commit into
mainfrom
worktree-pass-params

Conversation

@frederikprijck

Copy link
Copy Markdown
Member

Summary

  • Forward additional query parameters from the login route to the authorization request via authorizationParams, mirroring the behavior in auth0-express.
  • Reserved OAuth parameters (scope, audience, redirect_uri, client_id, state, nonce, response_type, code_challenge, code_challenge_method), the returnTo param, and prototype-polluting keys are filtered out before being passed through.

This lets consumers initiate login with params like organization, login_hint, or prompt by 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:
    • forwards extra query params as authorizationParams
    • filters reserved OAuth params
    • filters returnTo
    • filters prototype-polluting keys (__proto__, constructor, prototype)
  • npm run lint passes

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.
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.

1 participant