Passwordless Authentication with Email

Passwordless Authentication with Email

When Passwordless is configured to use email. the user is asked to enter their email address, to which Auth0 sends a one-time-use code. The user then enters the code into your application. To learn more, read Configure Email or SMS for Passwordless Authentication.

When a new user receives a code and enters it for the first time on your website, their user profile is created for the email connection before authenticated by Auth0. If the email address attached to the code matches an existing user, Auth0 authenticates the user:

Embedded Login

Passwordless email workflow diagram with embedded login

Universal Login

Passwordless email workflow diagram with universal login

Configure the connection

  1. Navigate to Auth0 Dashboard > Authentication > Passwordless, and enable the Email switch.

  2. Select your Email Syntax, and enter your email's From, Subject, and Message text.

  1. Enter any Authentication Parameters you would like to include in the generated sign-in link.

  2. Adjust settings for your OTP Expiry and OTP Length.

    • Only the last one-time password (or link) issued will be accepted. Once the latest one is issued, any others are invalidated. Once used, the latest one is also invalidated.

    • Only three failed attempts to input the one-time password are allowed. After this, a new code will need to be requested.

    • The one-time password issued will be valid (by default) for three minutes before it expires.

    • If you choose to extend the amount of time it takes for your one-time password to expire, you should also extend the length of the one-time password code. Otherwise, an attacker has a larger window of time to attempt to guess a short code.

  3. Decide if you want to Disable Signups. You can enable passwordless access just for existing users by enabling this setting.

Multi-language support

The Message area supports multiple languages.

To choose the language, call the /passwordless/start authentication endpoint and set the value of the x-request-language header. When this header is not set, the language is extracted from the accept-language header, which is automatically set by the browser.

Message syntax

The Message area accepts Liquid syntax. You can use this syntax, combined with exposed parameter values, to programmatically construct elements of the message. For example, you can reference the request_language parameter to change the language of the message:

{% if request_language contains 'dutch' %}
   Hier is uw verificatie code: {{ code }}
{% endif %}
{% if request_language contains 'fr-FR' %}
   Ceci est votre code: {{ code }}
{% endif %}

Was this helpful?


The following parameters are available when defining the message template:

Exposed Parameter Description
code The password to use.
link The generated sign-in link. The name of the application with which the user is signing up.
request_language The requested language for message content.
operation Indicates when the template has been triggered by an update to a user's email via the API. Equals change_email when triggered; otherwise, null.

Enable your apps

Select the Applications view, and enable the applications for which you would like to use Passwordless Email.

Email Providers

By default, Auth0 sends the email from its own SMTP provider. Auth0's built-in email infrastructure should be used for testing-level emails only. You can configure your own SMTP email provider to better monitor and troubleshoot the email service as well as be able to fully customize the emails.

You may configure Auth0 to send users one-time codes using: