OMCP OAuth Lab

PKCE S256

Check PKCE compatibility before blaming the client.

Remote MCP clients commonly use the authorization code flow with Proof Key for Code Exchange. Metadata must advertise the flow the authorization server actually enforces.

Metadata signals

{
  "response_types_supported": ["code"],
  "grant_types_supported": ["authorization_code", "refresh_token"],
  "code_challenge_methods_supported": ["S256"]
}

Verifier and challenge

The client creates a high-entropy verifier, derives a SHA-256 challenge, sends the challenge during authorization, and presents the verifier at the token endpoint. The authorization server must bind the two parts of the same transaction.

Frequent integration errors

Metadata is not enforcement. Advertising S256 is necessary for interoperable discovery, but only a live negative test proves that missing or incorrect verifiers are rejected.