updateMfaChallenge method

  1. @Deprecated('This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead.')
Future<Session> updateMfaChallenge({
  1. required String challengeId,
  2. required String otp,
})

Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use createMfaChallenge method.

Implementation

@Deprecated(
    'This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead.')
Future<models.Session> updateMfaChallenge(
    {required String challengeId, required String otp}) async {
  const String apiPath = '/account/mfa/challenges';

  final Map<String, dynamic> apiParams = {
    'challengeId': challengeId,
    '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.Session.fromMap(res.data);
}