mirror of
https://github.com/openai/codex.git
synced 2026-09-10 20:26:47 +00:00
## Why An authorization server discovered for an MCP server can change. A stored refresh token must not be sent to a different issuer than the one that originally granted it. ## What changed - Persist the discovered authorization server issuer with new OAuth credentials and preserve it across refreshes. - Validate that issuer against a single pinned metadata snapshot before refreshing or adopting stored refresh credentials. - Require reauthentication when refresh credentials have no issuer or the issuer changed. An unexpired access token can still be used without exposing its refresh token. ## Testing Add coverage for issuer persistence, missing and changed issuers, metadata changes during startup, and refresh-token preservation. GitOrigin-RevId: 07e48ba892f627428a28bbed5cca4ad703e2a5fd