public async Task <ActionResult> ResetPassword(LoginResetPasswordViewModel model) { if (!ModelState.IsValid) { return(View()); } try { await UserManagementMicroService.ResetPasswordAsync(model.UserId, model.Password, model.Code); return(RedirectToAction("ResetPasswordConfirmation", "Login")); } catch (ServiceException ex) { AddModelErrors(ex); return(View()); } }
public async Task <ActionResult> ResetPassword(string userId, string code) { try { var email = await UserMicroService.GetUserEmailAsync(userId); var model = new LoginResetPasswordViewModel() { UserId = userId, Code = code, Email = email }; return(View(model)); } catch (ServiceException ex) { AddModelErrors(ex); return(View()); } }