Sending Login Link to Users by email

Hi @dephraiim,

Welcome to the Auth0 Community!

I understand that you like to send your users a login link via Email.

To do so, I recommend using a Passwordless Authentication with Magic Links flow.

In this situation, you will need to first configure the Classic Universal Login experience with the Lock (passwordless) template:

Then in the code, include the passwordlessMethod: link property in the Auth0Lock object. For example:

var lock = new Auth0LockPasswordless(config.clientID, config.auth0Domain, {
  passwordlessMethod: 'link',  
  //... redacted for brevity
 });

Once you have configured these steps, you can have the Magic Links sent to newly created users by calling the Authentication API’s /dbconnections/signup endpoint.

Or if these users already exist, you can call the Authentication API’s /passwordless/start endpoint to begin the Passwordless authentication flow.

I hope this helps!

If you have any other questions, please feel free to reach out.

Thank you.

1 Like