in src/Amazon.AspNetCore.Identity.Cognito/CognitoUserStore/CognitoUserStore.IUserRoleStore.cs [132:150]
public virtual async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
try
{
await _cognitoClient.AdminDeleteUserAsync(new AdminDeleteUserRequest
{
Username = user.Username,
UserPoolId = _pool.PoolID
}, cancellationToken).ConfigureAwait(false);
return IdentityResult.Success;
}
catch (AmazonCognitoIdentityProviderException e)
{
return IdentityResult.Failed(_errorDescribers.CognitoServiceError("Failed to delete the Cognito User", e));
}
}