Repository navigation
fix: isolate MCP refresh token invalidation - #247
Closed
massimoalbarello wants to merge 1 commit into
Closed
massimoalbarello wants to merge 1 commit into
massimoalbarello wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#236 gave each agent instance its own authorization, but refresh-token replay detection in the OAuth provider still invalidates every login for the same user and OAuth client. Because Codex instances share a client ID, one instance retrying a stale token can disconnect the others.
How
Pin and patch the provider so replay cleanup is scoped to the originating connection and authorization-code grant, while retaining the user and client boundaries. Preserve token rotation and the 30-second retry window. Extend the real OAuth/SQLite tests for shared CIMD and dynamically registered clients to prove that the affected token family is revoked while another instance keeps refreshing and accessing MCP.