mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## Why An enterprise identity provider can return an OpenID Connect ID token without issuing a refresh token, even when Codex requests `offline_access`. The refresh-token requirement blocked those sign-ins. ## What changed For `ema_auth`, keep requesting `offline_access` and prefer a refresh token when available. Otherwise, use the stored ID token for the ID-JAG exchange after checking its issuer, audience, and expiry. Require reauthentication when the ID token is expired or invalid and no refresh token is available. Update `rmcp` to 3.6.0 for ID token exchange support. ## Testing Add regression coverage for sign-in with and without a refresh token, ID token expiry and issuer binding, and the subject token type sent to the identity provider. GitOrigin-RevId: ee7e253627c8274f9b3096e3b87e92e2f99885ea