If I send an email to a user's email address with a link to a password reset page, how do I authenticate the link? Should I store some randomly generated key in my database, and then add then to the link string? www.mydomain.com/passwordreset.html?key=abcd1234zz235
Then check this key against the stored key in the database?
If this is indeed the right approach, should I create some separate table to store these keys with their corresponding email? And if the answer to that is yes, then should I delete these keys after the user has reset their password to save space in my database?
Thank you in advance!