- When implementing and you want to customize the login page using auth0.js to interact with Auth0.
- When you want to embed the login flow in your application.
Passwordless endpoints
POST /passwordless/start
You must enable the Passwordless OTP grant at Auth0 Dashboard > Applications > Applications in your application’s settings under Advanced Settings > Grant Types.
- A single-use code via email or SMS message
- A single-use link via email
yourAuth0Tenant}.auth0.com/passwordless/verify-redirect
. Auth0 will redirect the user to the application, and the user will be logged in.
If you use a code, your application will need to prompt for that code, and then you should use the /oauth/token
endpoint, or the passwordlessLogin
method in the Auth0.js SDK to exchange that code for authentication tokens.
POST /oauth/token
If you are implementing passwordless for Native Applications or Regular Web Applications, you need to use/oauth/token
to exchange the OTP code for authentication tokens. You cannot use this endpoint from Single Page Applications.
To achieve this you first need to enable the Passwordless OTP grant for your application at Auth0 Dashboard > Applications > Applications in your application’s settings under Advanced Settings > Grant Types.
The user will receive the OTP code and your Native or Web application will prompt the user for it. When the user enters the code, you can complete the authentication flow by calling the /oauth/token
endpoint with the following parameters:
Using Auth0.js
When implementing Passwordless Authentication in Single Page Applications or in a customized Universal Login page, you should use Auth0.js and the included passwordlessLogin method. The implementation is complex, so we recommend that you use the library instead of calling the APIs directly.Rate limiting in passwordless endpoints
Auth0 rate limits and features only consider the IP from the machine that is making the API call. When the API call is made from a backend server, you usually want Auth0 to consider the IP from the end user, not the one from the server. Auth0 supports specifying anauth0-forwarded-for
header in API calls, but it is only considered when:
- the API call is made for a confidential application.
- the API call includes the .
- the Trust IP Header toggle is on.
Customize MFA
Customizable MFA with the Resource Owner Password Grant, Embedded, or Refresh Token flows is in Early Access. To learn more, read Product Release Stages. To participate in the early access, contact Auth0 Support.
/oauth/token
endpoint to request an access token, the returns an mfa_required
error which provides:
-
The
mfa_token
you need to call the MFA API for enrollment and challenges. -
The
mfa_requirements
parameter, which provides the factortype
your application supports for challenges.
mfa_token
to call the mfa/authenticator
endpoint to list all factors the user has enrolled and match the same type
your application supports. You also need to obtain the matching authenticator_type
to issue challenges:
request/mfa/challenge
endpoint.
Further customize your MFA flow with Auth0 Actions. To learn more, read Actions Triggers: post-challenge - API Object.