getMfaRecoveryCodes method

Future<MfaRecoveryCodes> getMfaRecoveryCodes()

Get MFA Recovery Codes

Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using createMfaRecoveryCodes method. An OTP challenge is required to read recovery codes.

Implementation

Future<models.MfaRecoveryCodes> getMfaRecoveryCodes() 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.get,
      path: apiPath, params: apiParams, headers: apiHeaders);

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