fix(accounts): avoid team auth snapshot collisions#104
Open
tinywind wants to merge 1 commit intofriuns2:mainfrom
Open
fix(accounts): avoid team auth snapshot collisions#104tinywind wants to merge 1 commit intofriuns2:mainfrom
tinywind wants to merge 1 commit intofriuns2:mainfrom
Conversation
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
ff717fe to
a1c923f
Compare
Owner
|
I think there is still a migration bug here.
That means a team with multiple users sharing one I would not merge this without a deterministic migration story for legacy state. |
Use a storage identity derived from account_id plus user_id when available, falling back to account_id for tokens without a user id. This keeps Codex auth payloads unchanged while preventing multiple users in the same workspace from overwriting each other's saved snapshots.
a1c923f to
da0539f
Compare
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
account_id + user_idwhen the access token exposes a user idaccount_id-only identity for tokens without a user idauth.jsonpayload unchanged while routing UI switch/remove actions through the unique storage idWhy
Multiple users in the same ChatGPT team/workspace can share the same
tokens.account_idwhile having distinctuser_idand email claims. Usingaccount_idalone causes reload/import to overwrite the previous user snapshot.Verification
git diff --check