Skip to content

fix(mcp): keep PKCE verifier in provider memory instead of disk - #1285

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-9001-mcp-pkce-instance-local
Oct 2, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-9001-mcp-pkce-instance-local

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • The PKCE code verifier lives in provider instance memory for the browser-flow episode and never reaches the mcp-auth/*.json file; legacy verifier keys are stripped on write.
  • Deleting the auth file drops the provider's in-memory tokens, and overlapping logins on different loopback ports each keep their own verifier while the shared file holds only the completed auth.
  • Token refresh uses only the stored client registration and refresh token, with no verifier involved.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check passes: lint and typecheck clean, dead-export guard reports 0 violations, 7884 tests pass with 0 failures across 520 files
  • New failing-first coverage: no verifier on disk across a full browser-flow save sequence, file delete drops memory tokens, two overlapping logins both complete

Fixes CL-9001

@linear-code

linear-code Bot commented Oct 2, 2026

Copy link
Copy Markdown

CL-9001

@TheGreatAxios
TheGreatAxios merged commit 0a4273d into main Oct 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant