loginWithOtp method
Authenticates the user using a mfaToken
and an otp
, after login
returned with an ApiException with ApiException.isMultifactorRequired
set to true
.
If successful, it returns a set of tokens, as well as the user's profile
(constructed from ID token claims).
Endpoint
https://auth0.com/docs/api/authentication#verify-with-one-time-password-otp-
Usage example
final result = await auth0.api.loginWithOtp({
otp: '123456',
mfaToken: 'received_mfa_token'
});
Implementation
Future<Credentials> loginWithOtp({
required final String otp,
required final String mfaToken,
}) =>
Auth0FlutterAuthPlatform.instance
.loginWithOtp(_createApiRequest(AuthLoginWithOtpOptions(
otp: otp,
mfaToken: mfaToken,
)));