public virtual IActionResult ConfirmPassword(string ident, string tok) { //Create PasswordConfirmationModel instance var model = new PasswordConfirmationModel { Token = tok ?? "", UserId = ident ?? "" }; //Display view return(View(model)); }
public virtual async Task <IActionResult> ConfirmPassword(PasswordConfirmationModel model) { //Verify password recovery token using service var result = await authService.VerifyPasswordRecoveryTokenAsync(model.UserId, model.Token, model.Password); if (result.Success) { //Token successfuly confirmed ViewBag.Message = "Successful email confirmation"; } else { //Something went wrong ModelState.FillWithErrors(result.Errors); } return(View()); }