updateMfaAuthenticator method
Verify Authenticator
Verify an authenticator app after adding it using the add authenticator method.
Implementation
Future<models.User> updateMfaAuthenticator(
{required enums.AuthenticatorType type, required String otp}) async {
final String apiPath =
'/account/mfa/authenticators/{type}'.replaceAll('{type}', type.value);
final Map<String, dynamic> apiParams = {
'otp': otp,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.User.fromMap(res.data);
}