LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Accounts and privacy
  4. · 4 minutes · Pro

The immortal reset link

A customer forwarded an old 'reset your password' email to a colleague by mistake. Months later, that link still lets anyone set a new password.

This answers: How long should a password reset link last? No coding needed. 3 quick decisions.

  • Who is signed in
  • Keeping data safe

Checking your access…

How long should a password reset link last?

A reset link should expire after a short time, often 15 to 60 minutes, work only once, and be cancelled when a newer link is requested. After the password changes, sign out other sessions and email the owner. Tokens must be long and random. A link that never expires turns every old email into a working key.

Trail of the bug
  1. Email service
  2. Browser
  3. Your server

Breaks at Your server: Reset token never expires

Why AI tools write this bug

AI-generated reset flows often store a token and check it exists, without an expiry time, a used flag, or cancelling older tokens.

How to fix it

  1. Add an expiry time to every reset token.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Should a reset link sign the user in automatically?
It is safer to let them set a new password and then sign in, so the link only does one thing.

Related scenarios

  • Rejected: no delete buttonPro · 3 min
  • Invoice 105Free · 4 min
  • The agent that reset productionFree · 5 min

More on this trail

Accounts and privacy: Login codes, reset links, email changes, account deletion and customer data sent to AI.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

3 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Add an expiry time to every reset token.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock