Auth0 Home Blog Docs

Login vs. Signup in Lock 11, Hosted Pages


Given a Hosted Page (Login) with a URL like this:

I used to be able to parse type from the config.extraParams, e.g.:

  var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
  config.extraParams = config.extraParams || {};
  var connection = config.connection;
  var prompt = config.prompt;
  var type = config.extraParams.type;

and I would have logic on the page to determine if this was a login page or a signup page, e.g.:

  allowSignUp: type == "login" ? false : true,
  allowLogin: type == "signup" ? false : true,
  languageDictionary: {
    title: type == "signup" ? "Welcome" : "Welcome Back"

Now that config no longer passes type to config.extraParams, how can you make a single Hosted Login Page support both login and signup?

Any help would be greatly appreciated!



:wave: @madasebrof1 I would need to double check but I’m wondering if we could use config.extraParams.initial_screen parameter instead? (so we could do something like initialScreen: this.signedUp ? 'login' : 'signUp'). Provided this parameter is still available, let me see on my end.