Conditional AllowedSignUp on Lock

Is there a way to conditionally show the Sign Up button on the Lock based on the Client ID using the lock?

We have multiple applications on the same lock. One application does not require the user to register as we create the logins for them. Another application is a mobile application where we have people register as part of the app.

For the first application we do not want to show the Sign Up button, but if the mobile application is using the lock we DO want to show the Sign Up button. Is this possible, or do we need to implement a custom login screen for the mobile application?

Hi @slance,

Welcome to the Auth0 Community Forum!

You should be able to conditionally allowSignUp based on config.clientID in the login customization page.

Hope this helps!


1 Like

I was able to solve the problem a little bit after I asked the question with the following code before lock was instantiated:

var allowSignUp = false;
var signUpLink = '';

if (config.clientID == '<client id>') {     
  allowSignUp = true;
  signUpLink = 'account/register';

var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
    allowSignUp: allowSignUp,
    signUpLink: signUpLink,
1 Like

Glad you figured it out!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.