Referer header leakage
10External resources or links on OAuth pages can disclose sensitive URL contents through the Referer header.
The server invalidates the code after exchange; the client should invalidate state after callback use. Optional URL cleanup is illustrated too.
Key idea: Keep OAuth pages free of leakage paths.
Rules & examples
Keep OAuth pages free of leakage paths.
- Authorization and callback pages SHOULD NOT include third-party resources or external links.
- An appropriate Referrer-Policy, such as no-referrer, suppresses referrer disclosure.
- Bind codes with PKCE or confidential-client credentials; invalidate codes after use and SHOULD invalidate state after its first use. Form post is another option.
The authorization page can leak state before it is consumed. A callback can leak codes. Single-use codes help after redemption, but a thief can race the legitimate client; duplicate redemption SHOULD trigger revocation of previously issued tokens.
Sources
New to this? Start hereA quick picture + helpful background
A key is different from permission.
An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.