Passwordless authentication from native applications is disabled by default for new tenants as of 8 June 2017. Users are encouraged to use Universal Login and perform Web Authentication instead. If you still want to proceed you’ll need to enable the MFA Grant Type on your dashboard first. See Application Grant Types for more information.
Set up the Android SDK
First, set up the Android SDK so that you can use the Passwordless methods below.Configure Auth0 and the Android SDK
Using the Passwordless API requires setting using the Auth0 Android SDK version 1.20 or higher.
Request the code
This example requests the code by callingpasswordlessWithEmail
with the user’s email, PasswordlessType.CODE
, and the name of the connection as parameters. On success, you may want to notify the user that their code is on the way, and perhaps route them to where they will input that code.
passwordlessWithSms
method to send the code using SMS.
Input the code
Once the user has a code, they can input it. Call theloginWithEmail
method and pass in the user’s email, the code they received, and the name of the connection in question. Upon success, you receive a Credentials
object in the response.
loginWithSms
method to send the code received by SMS and authenticate the user.
The default scope used is openid profile email
.