Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

COACHTHEM's avatar

How long the reset password token is valid and how can we set its expiry

I want my admin to create user and send them invitation with reset password link. For this I want to know the code to create reset password and send a email invitation link.

Also want to know the default validity of the reset token and how can I modify that.

0 likes
5 replies
COACHTHEM's avatar

Thanks @bobbybouwmann

The default expire is 60 minutes. Is it possible to set the no expiry and will it be a good thing to do. I am asking this because my users are bit lazy to reset their password ;)

1 like
bobbybouwmann's avatar

Of course you can update it. I would update it to a max of 24 hours. Otherwise it's not that secure anymore. In the end it's your application so be free with your choice ;) Also if a token is expired you can simply request a new one :P

1 like

Please or to participate in this conversation.