mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Interactive MCP OAuth must not trust authorization metadata that could route an authorization code or PKCE verifier to an unrelated token endpoint. ## What changed - Require an advertised issuer to match the origin that served authorization metadata. - Validate authorization and token endpoint origins before starting both pre-registered and dynamically registered client flows. - Allow delegated endpoint origins when the server advertises issuer-bound authorization responses, while retaining narrow compatibility exceptions for existing providers. ## Testing Add coverage for rejected untrusted metadata, accepted issuer-bound delegation, legacy provider exceptions, and both client registration paths. GitOrigin-RevId: 43c9f94c9f6ba2d23d7e373576cf9fa26861cfc3