verifyOtp method

Future<Credentials> verifyOtp({
  1. required String otp,
  2. Set<String> scopes = const {'openid', 'profile', 'email'},
  3. String? audience,
})

Verifies a one-time password (otp) for a TOTP authenticator and exchanges the mfa_token for Credentials.

Optionally pass scopes and audience to request specific scopes and an API audience for the returned Credentials. scopes defaults to {'openid', 'profile', 'email'}.

Implementation

Future<Credentials> verifyOtp({
  required final String otp,
  final Set<String> scopes = const {'openid', 'profile', 'email'},
  final String? audience,
}) =>
    Auth0FlutterWebPlatform.instance.mfaVerify(
        _mfaToken,
        MfaVerifyOptions(
            mfaToken: _mfaToken,
            grantType: MfaVerifyGrantType.otp,
            otp: otp,
            scopes: scopes,
            audience: audience));