[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771
// Send an email with this link
string code = await UserManager.GeneratePasswordResetTokenAsync(user.Id);
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
await UserManager.SendEmailAsync(user.Id, "Reset Password", "Please reset your password by clicking here: link");
return View("ForgotPasswordConfirmation");
}
// If we got this far, something failed, redisplay form
return View(model);
}
[AllowAnonymous] public ActionResult ForgotPassword() { return View(); }
[AllowAnonymous] public ActionResult ForgotPasswordConfirmation() { return View(); }
[AllowAnonymous] public ActionResult ResetPassword(string code) { return code == null ? View("Error") : View(); }
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task