Visual RFC.
ALL RFCs / RFC 8252
Read the RFC ↗
RFC 8252 / NATIVE-APP AUTHORIZATION

A browser round trip, protected by PKCE

02

Proof Key for Code Exchange (PKCE) lets an installed app prove it knows a fresh secret when exchanging a code.

RFC 8252 · § 6EXAMPLE
4 / 4
04
The initiating app redeems the code.

Alternative branch: the callback reaches the original app. It submits code C with its secret; the issuer checks the challenge and returns a separate access token.

A browser round trip, protected by PKCEProof Key for Code Exchange (PKCE) lets an installed app prove it knows a fresh secret when exchanging a code. Current state: The initiating app redeems the code..A browser round trip, protected by PKCEAlternative branch · callback reaches the original appOriginal appToken endpoint1 · code C + secret2 · access token TS256(secret) matches saved challengeCode C consumed only after successful exchangeSeparate outcome, not recovery of the intercepted callback.

Key idea: An intercepted code should be unusable alone.

Terms
Original app / client
The installed app requesting access. A public client cannot rely on a shared secret embedded in every app copy as proof of its identity.
Verifier and challenge
The verifier is a fresh secret for one authorization attempt. The challenge is a value derived from it and sent first.
S256
A SHA-256 hash with base64url encoding derives the challenge. The issuer repeats this operation on the submitted secret and compares the result.
Code C and token T
Illustrative names: the temporary code is exchanged for a separate access credential. They are not passwords.
Two callback outcomes
The interception and legitimate-delivery scenes are alternatives starting from the same setup. The original app is not shown recovering an intercepted callback.
Limits
PKCE binds the exchange to a fresh secret. It does not encrypt the callback or replace redirect checks, secure transport, or all app-identity and transaction checks.

Look up a term in the glossary ↗

Rules & examples
  • Public native apps MUST implement PKCE, and authorization servers MUST support it for them.
  • Generate a fresh verifier and send the corresponding challenge with the initial request.
  • Servers SHOULD reject native-app authorization requests that omit PKCE (§ 8.1).

RFC 9700 later extends explicit PKCE requirements across public OAuth clients, not just native apps.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

What changed
RFC 8252 § 8.1RFC 9700 § 2.1.1

The later BCP explicitly requires PKCE for all public clients and recommends it for confidential clients, with downgrade prevention at the server.

Read the updated RFC section ↗

All chapters in RFC 8252

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗