Safeguard
Security Guides•

Refresh token protection: rotation vs sender-constrained tokens

RFC 9700 says public client refresh tokens must be rotated or sender constrained. Compare both approaches, what each catches, and how to combine them.

Safeguard Security Team
3 min read

RFC 9700 says refresh tokens for public clients must be sender constrained or use refresh token rotation. Rotation detects theft after the fact by invalidating reused tokens. Sender constraint, such as DPoP, prevents use of a stolen token in the first place. Using both gives the best coverage.

Why refresh tokens need extra care

An access token is short lived. A refresh token can mint new ones for days or weeks, so it is a more valuable target. Public clients such as browser and mobile apps cannot authenticate with a secret, which means a stolen refresh token is usable by anyone who has it.

Approach 1: refresh token rotation

Each time the client uses a refresh token, the server returns a new refresh token and invalidates the old one. If a thief and the real client both use tokens from the same family, one of them will present an already used token.

When the server sees a reused token, the common response is to revoke the whole family so that neither party can continue. The user signs in again.

Strengths:

  • No client key management.
  • Works with any public client.

Limits:

  • Detection happens after a theft, not before. A thief who uses the token first gets a working session until the real client's next refresh triggers the revoke.
  • Flaky networks can cause a legitimate retry to look like reuse. Some servers allow a short grace window to tolerate it.

Approach 2: sender constrained tokens

With DPoP or mutual TLS, the refresh token is bound to a client key. Presenting it without a valid proof fails. See DPoP explained.

Strengths:

  • A stolen token alone is useless.
  • Prevents the first use, not just later ones.

Limits:

  • Needs support in the authorization server and client library.
  • Does not help if malicious code can use the key inside the client.

Comparison

RotationSender constraint
Stops first use of stolen tokenNoYes
Detects theftYes, on reuseNot by itself
Client complexityLowModerate
Server support neededCommonNewer, growing

Practical advice

  1. Turn on rotation for every public client now. It is widely supported.
  2. Add sender constraint where your stack supports it.
  3. Set an absolute session lifetime, so a refresh chain cannot run forever.
  4. Revoke the family on reuse and log the event as a security signal.
  5. Store refresh tokens in the most protected storage the platform offers, and avoid browser local storage where you can.

Quick check

Do confidential clients need rotation?

They authenticate with a secret, which already limits use of a stolen token. The RFC requirement is specific to public clients, though rotation is still cheap protection.

What if rotation locks out honest users on bad networks?

Some servers allow a brief grace period for the previous token. Treat that as a tuning decision and keep it short.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.