Whenever a user asks for resetting his or her password, a random token is generated and is embedded to the link that will be sent to the user email. I would like to implement token expiry but I was wondering how the system verifies the user other than user clicks on the link and the system compares the token with the one stored in the database.
From the security aspect, does it sufficient enough for user verification for password reset?
How to generate a secure token? What is the most recommended way of doing the password reset in PHP?
Here is the reference link: PHP - How to implement password reset and token expiry