Skip to content

Commit

Permalink
don't show ResetPassword page without valid code (#2052)
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterjun3 authored Nov 30, 2024
1 parent ee2a5a8 commit 6d5a46b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TASVideos/Pages/Account/ResetPassword.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public async Task<IActionResult> OnGet()
return Home();
}

if (!await userManager.VerifyUserTokenAsync(user, userManager.Options.Tokens.PasswordResetTokenProvider, UserManager.ResetPasswordTokenPurpose, Code))
{
return Home();
}

Email = user.Email;
return Page();
}
Expand Down

0 comments on commit 6d5a46b

Please sign in to comment.