PKCE

Theme: Protocols

Reviewed

In short: PKCE, Proof Key for Code Exchange, is an OAuth extension that stops anyone else exchanging a stolen authorization code for a token. In the desk's scores it falls under standards, weighted 15%, where Descope scores highest at 10 out of 10.

How it works

Before starting sign-in, the client creates a random secret called the code verifier. It sends a hashed form of it, the code challenge, with the authorization request. The authorization server stores the challenge and returns an authorization code after the user signs in.

When the client exchanges the code for a token, it must send the original verifier. The server hashes it and checks that it matches the stored challenge. An attacker who intercepted the code does not have the verifier, so the exchange fails. PKCE was first designed for mobile apps that cannot keep a client secret. OAuth 2.1 now requires it for every client using the authorization code flow, and MCP requires it too.

PKCE adds no cost for users. It runs in the background of the normal sign-in flow and needs no extra infrastructure.

Why it matters for AI agents

Many agent clients are desktop apps, IDE plug-ins or command-line tools. They cannot hold a client secret safely. PKCE protects their sign-in flows without one. It is a small piece, but an MCP client or authorization server that skips it fails the specification. Buyers can treat PKCE as a hygiene check. Any agent product that issues or consumes OAuth tokens should support it without configuration. If a vendor's documentation does not mention it, that is worth asking about during an evaluation.

Example

A command-line coding agent starts sign-in for a code host. It generates a verifier and opens the browser with the challenge. It receives the code on a local port and sends the verifier to get its token.

Related terms

  • OAuth 2.1OAuth 2.1 is an IETF draft that consolidates OAuth 2.0 and its security best practices into one framework for delegated access.
  • MCP authorizationMCP authorization is the part of the MCP specification that defines how remote servers use OAuth to decide whether a client may call them.
  • MCP clientAn MCP client is the component inside an AI application that connects to an MCP server and relays the model's tool calls to it.
  • Dynamic Client RegistrationDynamic Client Registration is an OAuth standard that lets a client register itself with an authorization server automatically, without an admin setting it up.

Where it shows up in our scores

Criterion: Standards and ecosystem, weighted 15% of the total. It asks: Published protocol support and breadth of what the product already connects to.

Highest on this criterion: Descope, at 10 out of 10. Computed from the current scores on the AI agent access governance ranking.

Top five on Standards and ecosystem, out of 10
ProductScore
Descope10
Aembit9
Silverfort7
Idira7
NewCore6

All 45 glossary terms

Sources