deleteAccount method
Future<void>
deleteAccount(
- String clientAuthFactor,
- IdentityProvider identityProvider,
- String? authId, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
This function deletes an account using client authentication factor, identity provider, and optional authentication ID.
Args:
clientAuthFactor (String): It is a string parameter that represents the authentication factor of
the client.
identityProvider (IdentityProvider): The identityProvider parameter is an object of type
IdentityProvider which represents the identity provider used for authentication.
authId (String): The authId parameter is an optional string that represents the unique
identifier of the authenticated user whose account is to be deleted.
Implementation
Future<void> deleteAccount(String clientAuthFactor,
IdentityProvider identityProvider, String? authId,
{required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result = await _methods.deleteAccount(
clientAuthFactor, identityProvider, authId);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}