Currently, password reset tokens do not expire, which poses a security risk. Adding an expiry date would enhance security for users.
### Node Version 22.19.0 ### NPM/Yarn/PNPM Version NPM 10.9.3 ### Strapi Version 5.39.0 ### Operating System Strapi Cloud ### Database Strapi Cloud ### Javascript or Typescript Typescript ### Reproduction URL _No response_ ### Bug Description When requesting a password reset, the generated reset token has no expiry date, meaning it remains valid indefinitely. If an attacker obtains a reset token (e.g. via email interception, logs, or a compromised inbox), they can use it at any point in the future to take over the account even months later. Thanks to @Schero94 for introducing me to the Strapi project. ### Steps to Reproduce 1. Create Password Reset Request 2. Store Password Reset Token 3. AS long as the token is not used or another password reset request is being made, it will stay valid forever ### Expected Behavior The token should have an expiry date (for example now+15 minutes). After that, the token is invalid and a new one has to be requested. ### Logs ```