deleteMfaAuthenticator method

  1. @Deprecated('This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.')
Future deleteMfaAuthenticator({
  1. required AuthenticatorType type,
})

Delete an authenticator for a user by ID.

Implementation

@Deprecated(
  'This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.',
)
Future deleteMfaAuthenticator({
  required enums.AuthenticatorType type,
}) async {
  final String apiPath = '/account/mfa/authenticators/{type}'.replaceAll(
    '{type}',
    _encodePath(type.value),
  );

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

  final Map<String, String> apiHeaders = {
    'X-Appwrite-Project': client.config['project'] ?? '',
    'content-type': 'application/json',
    'accept': 'application/json',
  };

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

  return res.data;
}