Redirect Users Directly to a Hosted Signup Page

Overview

This article provides steps to redirect users directly to the hosted Signup Page instead of the Login Page for both the New Universal Login and Classic Universal Login experiences. 

Applies To
  • New Universal Login Experience
  • Classic Universal Login
  • Signup Page
Solution

Two methods exist to redirect users, depending on the Universal Login experience in use. 

 

 

New Universal Login Experience

To make users land directly on the Signup page, specify the screen_hint=signup parameter when redirecting to /authorize.

NOTE: This can be combined with prompt=login, which indicates if the authentication page should always be shown or skipped if an existing session is present.

Classic Universal Login

This is accomplished by using the initialScreen option.

  1. In the Dashboard > Branding > Universal Login > Advanced Options > Login, configure the custom login page to look for an incoming query parameter, such as action=signup.

    var isSignup = config.extraParams && config.extraParams.action === "signup";
    var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
      [...] // all other Lock options
      // use the value obtained to decide the first screen
      initialScreen: isSignup ? "signUp" : "login",

    
    
  2. Add action=signup as a parameter in the request. For example, from auth0-spa-js, it can be added as follows:

    loginWithRedirect({ action: 'signup' });


We are also covering this topic in one of our videos:

    Related References

    Recommended content

    No recommended content found...