Skip to content

Auth0 Custom query parameters are not passed to /authorize endpoint #214

@skylertom

Description

@skylertom

Checklist

  • The issue can be reproduced in the Rails sample app (or N/A).
  • I have looked into the Readme and the Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

The Omniauth Auth0 gem is not compatible with Auth0's custom query parameters

There's documentation on passing query parameters with an ext prefix - https://auth0.com/docs/customize/login-pages/universal-login/customize-templates#custom-query-parameters

You can also use query parameters within the context by passing them to the /authorize endpoint when initiating the authentication request. These custom query parameters must have the ext- prefix.

However these are the only parameters passed directly to /authorize
https://github.com/auth0/omniauth-auth0/blob/9410989f01ecba40f8dd823847bacc66222b7b27/lib/omniauth/strategies/auth0.rb#L87-L89on

It looks like someone started this work in #204 - is there a reason why the team has not added this feature?

Reproduction

  1. Using the auth0 omniauth redirect send a parameter with the ext prefix (ex: ext-test)
  2. The redirect to /authorize will only include that parameter nested in the redirect_uri parameter

Additional context

No response

omniauth-auth0 version

3.1.1

OmniAuth version

2.1.4

Ruby version

3.4.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions