• Post Reply Bookmark Topic Watch Topic
  • New Topic

Temporary dynamic links?

 
Sophie Schnabl
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The basic problem is a reset password functionality for one-way password encryption. The desired functionality would be to send the user a unique link that leads him to a page where he can type in a new password. But the link should expire after a certain time (such as 48 hours). It also should of course work once to reset the password with this link.

Can anybody give me any pointers where to start even on the issue of pages/links that expire after a certain time after creation? I've tried googling it, but I'm not getting anywhere. Is there a specific term for this concept that I could look for? Any books that might cover an issue like this? Or is there no way to do it other than track the creation and destruction of pages like that through database+scheduling framework?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could include a hash of the username and timestamp in the URL, and store that in the DB along with that username and timestamp, and a flag whether or not it's been accessed already.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amazon's S3 (Simple Storage Service) has an option for short-lived URLs and has code available which you could study.

I used it in some examples here.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!