What is OAuth 2.1?
OAuth 2.1 is the in-progress revision of the OAuth 2.0 authorization framework. It removes the implicit and password grants, makes PKCE mandatory for the authorization code flow, requires exact redirect URI matching, and bans access tokens in URL query strings. It is the version the MCP authorization spec builds on, so coding agents inherit its rules.
Part of Glossary: the terms behind MCP, coding agents and shared pages, defined plainly.
The agent, a public client with no secret of its own, makes up a PKCE verifier and opens your browser at the authorization server with a hash of it.
You sign in and approve. The server sends a one-time code back to the exact redirect URI the agent gave; a near match is rejected.
The agent trades the code plus the original verifier for an access token. Without the verifier a stolen code is worthless.
The agent calls the service with the token in the Authorization header. OAuth 2.1 drops the option of putting it in the URL.
If a refresh token goes to a public client it must be single use or bound to that client, so a copied one stops working.
Source: The OAuth 2.1 Authorization Framework (draft-ietf-oauth-v2-1)
OAuth 2.1 versus OAuth 2.0
OAuth 2.0, RFC 6749, was published in 2012 as a framework full of options. Over the next decade the working group learned which options get people hacked and wrote the fixes down in separate documents: PKCE for native apps, the security best current practice in RFC 9700, guidance for browser-based apps. OAuth 2.1 merges that pile into one text and drops what no longer belongs. Once published it replaces and obsoletes RFC 6749 and RFC 6750, the bearer token spec.
The changes are short enough to list. The authorization code grant now includes PKCE by default. Redirect URIs are compared by exact string match, with one exception for loopback addresses, where the port may vary. The implicit grant and the password grant are gone. Bearer tokens may no longer travel in a URL query string. Refresh tokens handed to public clients must be either single use or bound to the client that received them. The token request no longer repeats the redirect_uri parameter, authorization servers must accept client credentials in the request body, and the weaker "plain" PKCE method is removed.
None of this is news to anyone who followed the best practices. The point is that a compliant server can no longer opt out of them.
Example: a coding agent signing in
Claude Code, Codex or Cursor running on your laptop is a public client: anyone can read its code, so it cannot hold a secret. Under OAuth 2.0 such a client could get by with a bare authorization code flow, and a malicious program on the same machine could catch the code on its way back. Under OAuth 2.1 the agent makes up a PKCE verifier first, so the code is useless to anything that did not start the request. When an agent connects to Intraface's MCP server this is the flow it runs: your browser opens, you click Allow, the agent trades code plus verifier for an ifc_ token, and it sends that token in a header from then on.
Why it matters for agents
The MCP authorization spec requires authorization servers to implement OAuth 2.1 and names the draft it follows. Agents are the public-client case the spec was tightened for: they run on developer machines, they connect to servers nobody vetted in advance, and a leaked token lets a program act as a person. Exact redirect matching, mandatory PKCE and tokens kept out of URLs each close a path attackers have used in the wild.
Common mistakes
- Treating it as a new protocol. It is OAuth 2.0 with the unsafe parts cut out. A 2.0 server that already demands PKCE and exact redirects is most of the way there.
- Waiting for a finished RFC before adopting it. The current text is draft 16 from September 2026. It is stable enough that MCP builds on it; the rules it contains are already best practice.
- Keeping the implicit grant around for single-page apps. Those apps use the code flow with PKCE now. Tokens in URL fragments are exactly what the implicit grant leaked.
- Assuming a refresh token is safe to copy between machines. For public clients it is single use or client-bound, so the copy, or the original, stops working.
FAQ
- Is OAuth 2.1 a finished standard?
- Not yet. The current text is draft 16 of draft-ietf-oauth-v2-1, dated September 2026, from the IETF OAuth working group. When published it will replace and obsolete RFC 6749 and RFC 6750. The MCP authorization spec pins the specific draft it follows.
- Does OAuth 2.1 break existing OAuth 2.0 servers?
- Rarely. OAuth 2.1 is mostly a subset of 2.0. A server that already requires PKCE, matches redirect URIs exactly and does not offer the implicit or password grants is already compliant. Servers that still rely on those grants, or accept tokens in query strings, have to change.
- Why does MCP require OAuth 2.1 rather than OAuth 2.0?
- Agents are public clients on developer laptops talking to servers they have never met. OAuth 2.0 left the protections for that case optional; OAuth 2.1 makes PKCE, exact redirect matching and header-only tokens mandatory, so an MCP client can assume them.
Stop sending HTMLover Slack.
Create an account in a minute, connect your coding agent, and make your first board.