I've done a function in the codeigniter for password recovery and everything is working, only I wanted it to expire the link has a x time / day.
What is the logic to use in this situation?
I've done a function in the codeigniter for password recovery and everything is working, only I wanted it to expire the link has a x time / day.
What is the logic to use in this situation?
A good solution would be, when requesting password recovery:
Having a constant that defines the expiration time;
When the link is accessed:
GET
; If there is a password change, change or remove the token to invalidate the link.
This is a generic and safe way to do it, of course! Not being the only one.
I hope you have helped!