In Visual Studio 2017, if you create a new ASP.NET Core Web Application (Razor Pages) configured to use Individual user accounts and Store user accounts in- app, the "Forgot password" flow is as follows.
- User goes to login page
- User click "Forgot your password?"
- User enter email address and click "Submit"
- An email is sent to the user with a link to reset password. This link contains the user id (Guid), and a code used for reset.
- User click link and is taken to the "Reset password" page.
- User enter Email, Password and Confirm password and click Reset.
Password is then reset.
My question is if there is some specific reason the user is requested to enter his email in step 6, considering that the user id is already in the URL. The reset password page could look up the user by the id and not ask for the email address.
I assume it's a security-feature, in case someone intercepts the link. But intercepting the link would likely mean intercepting the email containing the link, and then the users email would be known anyway. So I feel like I am missing something.