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?


#14

Hey @alex7, at this point I don’t have a link to the GitHub issue as it’s still being reviewed for documentation.

However we do suggest you upgrade to the latest version of Lock (11.9.1) and the signUpLink will only show if the connection is configured to allow signups.

It’s important to note that if you disable signups for the connection the signup tab will not show regardless of the allowSignUp and signUpLink values.

Thanks!


#15

If I understood your previous comments on this thread, the link should show up if I set it regardless of what I have for sign up for the connection? (ie assuming there wasnt a bug in the lock)?


#16

After continuing to work with our TSE team we were able to confirm that when setting signUpLink is set to a non empty string it forces allowSignUp to true. But, the allowSignUp option does not override the sign up option for the connection. If signups are disabled for the connection, the signup tab will not show. I apologize for any confusion.


#17

Okay but I would like to show a sign up link! That is the whole point I am setting it. I don’t want the user to be able to sign up using the auth0 api (hence why I disabled the ability to sign up on the connection and am supplying my own to my own site).


#18

We feel that Auth0 Lock provides an out of the box solution that supports most use cases. However in the event lock doesn’t support your use case, then crafting a custom login and sign up experience leveraging Auth0.js would be the ideal way to go.


#19

I get the point of lock.

that being said, reading back over this thread it seemed like you agreed with me and my point earlier. I would say that the lock is being “too smart”. If I have an explicit sign up link, just use it, don’t hide it because the connection has sign ups turned off.

I would also point point that given that it has taken almost half a month to get where we are, the docs for the lock are really lacking around this behavior.


#20

Any updates on this ? It really seems wrong that given my desire to manage the sign up process (and hence the reason I want to supply a custom signup url in the first place) that the only way to get the lock to show the link is to enable open signs ups on the db connection. The whole point was I don’t want users to be able to directly sign up.


#21

Hey there @alex7, let me see if I can find out some more information on this front. Thanks.