Answers for "verifyusertokenasync password reset token"

C#
0

verifyusertokenasync password reset token

[HttpGet]
public async Task<IActionResult> ResetPassword(string UserId, string token)
{
    ...

    ApplicationUser user = //get user;


    if(!await this._userManager.VerifyUserTokenAsync(user,this._userManager.Options.Tokens.PasswordResetTokenProvider, "ResetPassword", token)){
        ViewBag.Message = this._localizer["tokenNotValid"].Value;
    }

    ...
}
Posted by: Guest on June-20-2020

C# Answers by Framework

Browse Popular Code Answers by Language