Pass Additional Parameter to the Universal Login URL

Overview

This article details how to pass additional parameters to the universal login URL.

Applies To

  • Universal Login

Solution

It is possible to send the custom parameters when performing an /authorize request that can be picked up by the Universal Login page templates.

This must be passed to the /authorize request while creating the Auth0 object in the application code. Here is an example:

export default handleAuth({
   login: handleLogin({
     authorizationParams: { ext-customParam: 'foo' } // Pass in custom params
   })
});

This is also documented in this GitHub repo.

Also, it is possible to use query parameters within the context of the Login page template by passing them to the /authorize endpoint when initiating the authentication request. These custom query parameters must have the ext- prefix. Please see Custom query parameters for more details and an example that uses the custom query parameters in the login page template.

NOTE: The query parameters cannot be passed to /login. However, extra parameters can be added to the /authorize request and then accessed in the login page template.