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.
/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:
auth0-forwarded-for
header in API calls, but it is only considered when:
/oauth/token
endpoint to request an access token, the returns an mfa_required
error which provides:
mfa_token
you need to call the MFA API for enrollment and challenges.
mfa_requirements
parameter, which provides the factor type
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.