Repository navigation
fix(cursor): enable multi-account OAuth by extracting JWT identity - #67
Merged
lidge-jun merged 1 commit intoJul 9, 2026
Merged
Conversation
Cursor tokens carry a stable sub claim but login never persisted it, so add-account flows replaced the active slot and the GUI polled forever. Extract accountId (and email when present) from Cursor JWTs and treat add-account completion as done when the OAuth flow finishes.
Owner
|
Reviewed against current
Decision: accepting. I'll merge this into |
Owner
|
Landed: merged into |
agentHits
pushed a commit
to agentHits/opencodex
that referenced
this pull request
Sep 17, 2026
…oauth fix(cursor): enable multi-account OAuth by extracting JWT identity
3 tasks done
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.
Summary
sub(andemailwhen present) during login and token refresh, so the multiauth store can append distinct accounts instead of always replacing the active slot.done: true) as success, not only when the account count grows — covers same-account re-login.Problem
Adding a second Cursor account showed "Waiting for browser…" forever even after Cursor returned "All set!". OAuth completed (
done: true) butaccounts.lengthstayed at 1 because Cursor credentials had no persisted identity.Test plan
bun test tests/cursor-oauth.test.ts tests/oauth-store-multi.test.ts