Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I send a link as email to the users asking him to reset the password. Clicking on the link redirects to a page in my project. How can i set the expiration time for this link, and how do i know if this link is not re used again? Whats the best way to do this?

Thanks
Posted

1 solution

The way I do it is to have a query string with a Guid attached to the link address.
The page it addresses access the DB and if a record for that Guid exists, checks the expiry date in the DB. If all is fine, delete the DB row, and action the reset.

Anything wrong, and dump the row, do nothing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900