重置密碼:先生成重置密碼的Token,然後呼叫ResetPassword方法重置密碼,密碼要符合規則..
ApplicationUserManager UserManager => _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>(); string token = UserManager.GeneratePasswordResetToken(id); UserManager.ResetPassword(id, token, newPassword);