Generate temporary URL to reset password

前端 未结 9 576
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 02:08

I am looking to implement a Forgot Password feature on my website. I like the option where an email containing a temporary one-time use URL that expires after some time is sent

9条回答
  •  时光说笑
    2021-01-30 02:24

    Depending on your needs, you could encrypt information, in a format similar to the following format

    (UserId)-(ExpireDate)
    

    Encrypt the data, make that the link, then decrypt the data and take action from there...

    Crude, but most likely usable, and not requiring DB usage

提交回复
热议问题