updateMfaRecoveryCodes method

Future<MfaRecoveryCodes> updateMfaRecoveryCodes()

Regenerate MFA Recovery Codes

Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using createMfaRecoveryCodes method. An OTP challenge is required to regenreate recovery codes.

Implementation

Future<models.MfaRecoveryCodes> updateMfaRecoveryCodes() async {
  const String apiPath = '/account/mfa/recovery-codes';

  final Map<String, dynamic> apiParams = {};

  final Map<String, String> apiHeaders = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.patch,
      path: apiPath, params: apiParams, headers: apiHeaders);

  return models.MfaRecoveryCodes.fromMap(res.data);
}