RFC 9700: Running OAuth 2.0 securely

Summary

In January 2025, Torsten Lodderstedt of the German Federal Agency for Breakthrough Innovation SPRIND, John Bradley, Andrey Labunets and Daniel Fett specified best current security practice for OAuth 2.0 in RFC 9700. The document supplements RFC 6749, RFC 6750 and RFC 6819 with experience from more than ten years of operation. It declares the implicit grant no longer advisable, forbids the password grant and makes PKCE mandatory for public clients.

What should no longer be used

With the implicit grant, the authorization server delivers the access token directly in the redirect to the browser. The RFC describes how such tokens can leak and be replayed; clients should use the authorization code grant instead.

The resource owner password credentials grant, in which the client itself receives username and password, must no longer be used. It exposes credentials to the client, trains users to enter passwords in the wrong places and fits neither two-factor methods nor WebAuthn.

What becomes mandatory

Authorization servers must compare redirect URIs by exact string matching, with an exception for ports on localhost. Public clients must use PKCE, and it is recommended for confidential clients; the only method the RFC names is S256.

Stolen access tokens should remain useless: for this the RFC recommends sender-constrained tokens via mutual TLS per RFC 8705 or DPoP per RFC 9449. Anyone working with several authorization servers must protect against mix-up attacks, for example with the iss parameter from RFC 9207.

Ideas

  • Redirect URIs are compared exactly.
  • Public clients must use PKCE with S256.
  • The implicit grant should no longer be used.
  • The password grant is forbidden.
  • Sender-constrained tokens make stolen tokens worthless.
  • Refresh tokens of public clients need binding or rotation.

Insights

  • A flexible framework only becomes secure through clear prohibitions; options that were once convenient must be explicitly withdrawn.
  • PKCE was designed for mobile apps and turned out to protect all kinds of clients.

Facts

  • RFC 9700 appeared in January 2025 as a Best Current Practice.
  • It updates RFC 6749, RFC 6750 and RFC 6819.
  • According to the RFC, S256 is currently the only PKCE method that does not expose the verifier.
  • For sender-constrained tokens it refers to mutual TLS (RFC 8705) and DPoP (RFC 9449).

References

Remarks

  • At the time of the RFC, Torsten Lodderstedt worked at the German federal agency SPRIND; Daniel Fett is also a co-author of RFC 9901 on SD-JWT.

Recommendations

  • Disable the implicit grant and password grant in your own applications.
  • Register redirect URIs without wildcards and have them checked exactly.
  • Enable PKCE with S256 for web applications with a client secret too.

Read the RFC at the RFC Editor

Search the Web Archive

Found a mistake or have something to add? Get in touch.