When OAuth Refresh Tokens Live Forever: How to Force Short Expiry in Production

OAuth 2.0 refresh tokens are supposed to be long‑lived, but “forever” is a misnomer that can open a wide attack surface. A compromised refresh token gives an attacker persistent access without re‑authenticating, and if it never expires the window for damage widens. Below is a practical checklist that shows how to enforce short expiry, monitor usage, and mitigate risk without breaking the user experience.

1. Enforce Expiry at Issuance

Most IdPs expose a knob for refresh‑token lifetime. If you control the IdP, set a maximum TTL that matches your threat model.

[Read More]