A stolen code fails the proof
04The token endpoint recomputes the challenge and compares it with the one bound to the code.
The server returns invalid_grant and issues no token for the failed exchange.
Key idea: A mismatched verifier produces invalid_grant.
Rules & examples
A mismatched verifier produces invalid_grant.
- A mismatched verifier produces invalid_grant.
- A code alone does not satisfy PKCE.
- Other authorization-code validation rules still apply.
The illustration is schematic. Example values are illustrative; profiles and later security guidance can add requirements.
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.