Auth0 Home Blog Docs

Setting signUpLink in hosted login page doesn't show link in UI


#1

I am using the hosted login page with lock 11.3. I have set signUpLink to a non empty string yet I don’t see any “sign up” options in the UI. Is there something else missing to get the UI to update?


#3

Hey there @alex7. Are you seeing any errors in the developer console when the hosted login page should be presenting it? Also can you add a console.log in the block where the signUpLink is being present to confirm the object is being passed?

If nether of these produce positive results, I would recommend sending over a code sample so we can take a look at it.

Also here are some helpful documents when working with lock and hosted login pages.


#4

I am not seeing any errors in the console. I added a log and that block is being run.

Here is the block:

var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
  auth: {
    redirectUrl: config.callbackURL,
    responseType: (config.internalOptions || {}).response_type ||
      (config.callbackOnLocationHash ? 'token' : 'code'),
    params: config.internalOptions
  },
  /* additional configuration needed for custom domains
  configurationBaseUrl: config.clientConfigurationBaseUrl,
  overrides: {
    __tenant: config.auth0Tenant,
    __token_issuer: 'YOUR_CUSTOM_DOMAIN'
  }, */
  assetsUrl:  config.assetsUrl,
  allowedConnections: connection ? [connection] : null,
  rememberLastLogin: !prompt,
  language: language,
  languageDictionary: languageDictionary,
  theme: {
    //primaryColor:    'blue'
  },
  signUpLink: 'https://www.mylink.com/',
  allowSignUp: true,
  prefill: loginHint ? { email: loginHint, username: loginHint } : null,
  closable: false,
  defaultADUsernameFromEmailPrefix: false,
  // uncomment if you want small buttons for social providers
  // socialButtonStyle: 'small'
});

I basically used the default template for the login hosted page and updated the link, the theme and the lock version.


#5

From working with our TSE team, we were able to determine that the signUpLink needs to be placed within the options var as stated in this doc here. Please apply the change and give it another run and let us know if you continue to experience the issue. Thanks!


#6

How is that different from what I posted?


#7

We’re not seeing the var options anywhere in the above referenced snippet.


#8

If I am reading the docs right, the entire third argument to Auth0Lock is options. Also to be clear, what I posted is a slight customization on the template for hosted page that Auth0 supplies.

new Auth0Lock(config.clientID, config.auth0Domain, {

#9

Hey Alex, do you have a database connection enabled for your application? The signup option is not available for non-db connections such as social providers or other enterprise connections.

We’ve been able to confirm your lock initialization works successfully on our end, including the custom signup link when plugged into a sample app. Thanks in advance!


#10

Yes, I have a database connection enabled and still don’t see any sign up link. That being said, out of curiosity, why would the “sign up link” not work for any connection type? I get why regular sign up is limited, but I would think the link should always work?


#11

When you get a minute can you please DM me your tenant name, application id, and whether or not you are using HLP? From there we can dig in deeper to see what maybe going on.


#12

After further investigation with our TSE team, we were able to reproduce the issue. We believe this is an issue with the lock library and will need to be looked at with our development team. We are creating a GitHub issue so this can be tracked accordingly.

However a workaround would be as follows:

It appears you have 2 Username Password Database connections enabled for your client. If you do not specify the connection name when launching the Hosted Login Page the sign up link will show if you remove the allowSignUp: true attribute from your Hosted Login Page.

If you do specify the connection name when redirecting the Hosted Login Page the sign up link will not show if the “disable signups” option is enabled for the connection - if “disable signups” is not enabled, the signup link will show regardless of the presence of the allowSignUp: true.

Please let me know if you have any questions!


#13

Can you link to the GitHub issue?