How to setup configuration for email + password, email + email otp and phone + otp feature in Universal Login - Auth0

Hi @yadavshivharakhyadav

Welcome to the Auth0 Community!

The implementation that you are looking for can be cannot be achieved using a single tenant due to the following reasons:

  • Both Email and SMS passwordless connections cannot be enabled at the same time, if you do, the Email connection will take priority.
  • You cannot have a passwordless connection enabled when there is a database connection enabled mainly because:
  1. When a user signs up to your application, the Database connection will take priority and be asked to enter a password.
  2. IF an user created with the Email passwordless connection attempts to log in, they will be asked for a password even though they do not have one.
  3. If an user with multiple identities exists (ex: test@test.com using a Database connection and the same user using the Email connection) it will default to the user which exists in the Database connection.

Taking the things above into consideration, it is possible to implement this by using multiple tenants.

You would need to have 3 separate tenants created, one for each type of connection:

  • Database
  • Passwordless Email
  • Passwordless SMS

After that, you would need to set up the Passwordless tenants as IdPs for the main tenant which will be using the Database connection. In order for you to be able to do this, you would need to set up either an SAML or OIDC connections so that you can display them inside your application as buttons(so that the users can choose which identity they want to log in as). However, this can present issues if a user has 2 identities created, since they will have two seaparte accounts and they will not share information between them. To mitigate this, you could deny any sign-ups/logins if the user already exists with a different connection inside the main tenant.

If you have any other questions, let me know!

Kind Regards,
Nik

1 Like