Passwordless Authentication on Database Connections
Learn how to configure true passwordless authentication on a new or existing database connection.
Auth0 allows you to configure email and phone-based passwordless authentication directly on a database connection. Rather than creating a separate connection for one-time password (OTP) authentication, you can offer passwordless login directly from your database connection. This reduces implementation complexity and simplifies the login experience for end-users.
Passwordless for database connections is not supported for use with Classic Login.
Auth0 looks up the authentication methods for each identifier configured on your database connection.
The user is presented with the most suitable option based on the default_method and available authentication methods (for example, receive an OTP by email or phone or provide a password).
If OTP is the determined authentication method, Auth0 sends a code to the user’s email or phone.
The user enters the code and is authenticated. If you’ve configured passkeys, the user is prompted for progressive passkey enrollment.
Attributes must be enabled on the database connection.
If you plan to use existing (legacy) passwordless connections in conjunction with passwordless authentication on database connections, and you don’t want to configure your existing passwordless connections to use the Unified Phone Provider:
When configuring email and phone-based passwordless authentication on database connections, you must first determine which attribute(s) you want end-users to provide during signup and login.Review the identifier type and corresponding authentication method:
Identifier
Authentication Method(s)
Email
Password, Email OTP, Passkey
Phone
Password, Phone OTP, Passkey
Username
Password
For email and phone identifiers, if password is not enabled, you must have OTP verification enabled for sign up. You can configure email and phone attributes as optional on signup, so users can sign up with just an email or just a phone number.When a user authenticates via email OTP, email_verified is automatically set to true on their profile. When a user authenticates via phone OTP, phone_verified is automatically set to true.
If you want end-users to authenticate with passkeys, you must have an alternative authentication method configured, such as email or phone. Passkey-only authentication is not supported.
Choose one or more attributes for end-users to log in or sign up.
Select your authentication method(s). You can further configure these methods once you’ve created the connection.
Toggle on Disable Sign Ups if you don’t want users to sign up using public endpoints.
Toggle on Promote Connection to Domain Level if you want to use this connection with third-party applications.
Select Create.
For a true passwordless connection, complete the following additional steps:
In your new connection, select the Attributes tab.
To disable Username as an identifier, select Configure and toggle off Use Username as Identifier.
To configure Email and Phone identifiers, select Configure.
For Email attributes, select One-Time Password (OTP) under Verification Methods and enable Verify email on sign up for true passwordless configuration. This ensures email_verified is automatically set so users are always prompted for OTP on login and signup.
Select Save.
Configure settings for authentication methods that correspond to the chosen identifiers. You cannot disable password unless you have phone_otp and/or email_otp configured.
Under Password settings, select Policy and choose Block for:
Call the Update a Connection endpoint. Add the default_method option to set the first authentication method. For Email attributes, set either password or email_otp. For Phone attributes, set password or phone_otp.
The post-login trigger fires after a user authenticates but before the authorization server returns a token. The event.authentication object in Auth0 Dashboard > Actions > Triggers > Post Login exposes the following methods:
Method
Parameter
Description
Email OTP
email
Email OTP used to authenticate the user as the first factor.
Phone OTP with text
sms
Phone OTP (SMS) used to authenticate the user as the first factor.
Phone OTP with voice
tel
Phone OTP with voice used to authenticate the user as the first factor.
Password
pwd
Password used to authenticate the user as the first factor.
email_verified and phone_verified are set automatically on the user profile when a user authenticates via email OTP or phone OTP. If you previously used a post-login Action to manually set these flags, you can remove that workaround.
Use event.authentication to:
Detect which passwordless factor the user completed (email, sms, tel, or pwd)
Add custom claims to tokens based on the authentication method
Conditionally run logic based on how the user authenticated
The following example reads event.authentication.methods to detect which passwordless factor the user completed and adds it as a custom claim on the ID token.
The following example reads event.authentication.methods to detect which passwordless factor completed the challenge and adds it as a custom claim on the ID token.
Simplified Implementation: Fewer connections to configure and maintain. No need for account linking unless using social/federated connections in conjunction with database connections.
Improved User Experience: Offer combinations of email and phone-based OTP with passwords, passkeys, and social/federated login all from the same identifier-first experience in Universal Login.
Flexible Signup Flows: Configure email and phone attributes as optional on signup, allowing users to sign up with just an email or just a phone number — ideal for mobile-first or email-only experiences.
Voice OTP: Voice OTP is included as a first factor when configured in the Unified Phone Experience.
Available for Universal Login-based flows only; not yet supported for API-based authentication.
Passwordless for database connections is not supported for use with Classic Login.
Passwordless for database connections does not support Implicit Signup & Login.
In legacy passwordless connections, there was no difference in user experience between signup and login. Database connections distinguish between the signup and login experience, which requires explicit signup and login.
If a user without an Auth0 identity enters the login flow, the system will not automatically sign them up. The user receives an error after validating the OTP.
If a user with an Auth0 identity enters the signup flow, the user receives an error after validating the OTP.