Skip to content

Keep MCP OAuth tokens after browser auth across sessions - #861

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7547-keep-mcp-oauth-tokens-after-browser-auth-across-sessions
Sep 10, 2026
Merged

Keep MCP OAuth tokens after browser auth across sessions#861
TheGreatAxios merged 1 commit into
mainfrom
cl-7547-keep-mcp-oauth-tokens-after-browser-auth-across-sessions

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • saveTokens updates this session immediately, so a just-completed browser login is visible without waiting for the disk write to finish.
  • resetAuthorization only deletes tokens this session actually held, so another session's completed login is not wiped from the shared auth file.
  • Auth-file updates take a cross-process exclusive lock so two Corbits Code processes cannot drop tokens while writing PKCE.

Verification

  • bun test ./src/mcp/oauth-provider.test.ts ./src/mcp/auth-store.test.ts — 32 pass
  • bun run typecheck — exit 0
  • bun run build — exit 0
  • bunx eslint src/mcp/oauth-provider.ts src/mcp/auth-store.ts src/mcp/oauth-provider.test.ts src/mcp/auth-store.test.ts — exit 0
  • bunx prettier --check on those files — exit 0

Fixes CL-7547

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7547

@TheGreatAxios
TheGreatAxios force-pushed the cl-7547-keep-mcp-oauth-tokens-after-browser-auth-across-sessions branch from b959c6b to efabd23 Compare September 10, 2026 04:21
@TheGreatAxios
TheGreatAxios merged commit 63a8582 into main Sep 10, 2026
9 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