I use a token generated from bin2hex()
for a user to reset their password. This token is stored as is in the db and when a user uses it their token is searched against the one in the db and if they are the same they can reset their password.
I was reading here (PHP - How to implement password reset and token expiry) that I should hash the password before storage. This seems like a good idea, but I was wondering how I would search against the hashed password, would I also need to include the username/email in the token-based url that is sent to the user so that they can be searched again and then the hashed token is checked?
Is it okay to include an obvious identifier in the reset link (I suppose that it is because it is sent to their email address).