public async Task <ConfirmationResult> ConfirmAccount(string userEmail, string secret) { if (await _identityProvider.VerifyUserEmailConfirmed(userEmail)) { return(ConfirmationResult.UserAlreadyConfirmed); } var success = await _identityProvider.ConfirmEmailWithToken(userEmail, secret); if (success) { var passwordResetToken = await _identityProvider.GeneratePasswordResetToken(userEmail); var result = ConfirmationResult.Successful(userEmail, passwordResetToken); return(result); } return(ConfirmationResult.Failure); }