part 2OAuth 2.1 from scratch·lesson 2.2 of 10·2 min read
From OAuth 2.0 to OAuth 2.1: what was removed and why
OAuth 2.1 is not a new protocol: it is OAuth 2.0 after ten years of lessons learned. This lesson covers which grants were removed and why they were dangerous, what went from optional to mandatory (PKCE, exact redirect_uri matching), and the difference between public and confidential clients, which explains why PKCE matters so much in MCP.
In this lesson
Identify which flows were removed and why they were dangerous.
List what went from optional to mandatory.
Tell a public client from a confidential one.
What changed between OAuth 2.0 and OAuth 2.1
OAuth 2.0 (RFC 6749, 2012) was a very flexible framework. Over the years, security RFCs were published saying "don't use this" and "always do that". OAuth 2.1 consolidates all of it into a single document. It is still an IETF draft: MCP 2025-03-26 references draft 12 and later revisions reference draft 13.
Change
OAuth 2.0
OAuth 2.1
Why
Implicit grant
Allowed
Removed
It returned the token directly in the URL (the #access_token=… fragment): it ended up in browser history, logs and browser extensions.
Password grant (ROPC)
Allowed
Removed
The client asked for your username and password. Exactly what OAuth wanted to avoid.
PKCE
Optional (for mobile apps)
Mandatory with authorization code
Makes a stolen code useless (see lesson 2.5).
redirect_uri
Flexible comparison
Exact match
Wildcards made it possible to redirect codes to attacker URLs.
Token in the query string (?access_token=)
Allowed
Forbidden
URLs get logged everywhere.
Refresh tokens for public clients
No requirements
Rotated or sender-constrained
A refresh token stolen from a client without a secret must stop working quickly.
Public vs. confidential clients
A concept that shows up everywhere:
Confidential
Can keep a secret (a client_secret or a private key) because it runs on a server you control. Example: a web backend.
Public
Cannot keep secrets: its code runs on the user's machine and anyone can extract them. Example: most MCP clients (desktop apps, CLIs, extensions).
That is why PKCE is so important in MCP: it is how the flow is protected when the client has no secret. In client metadata you will see token_endpoint_auth_method: "none" for these clients.