codeburn/app/electron
iamtoruk 7533e96fe3 fix(quota): discard a Codex refresh whose login changed under it
The refresh reread auth.json before writing the rotated tokens but only
checked it was still ChatGPT mode, not that it was still the same login.
A `codex login` account switch, or a second CodeBurn process refreshing
the same credential, landing while our refresh was in flight let the late
response splice one account's tokens into another's document: a new
account id over an old refresh token, or an older refresh token over a
newer one. Either signs the user out or binds them to the wrong account.

The login the grant belongs to is now captured before the grant and
compared against the reread document on account id, refresh token and
id-token subject. A demonstrated mismatch discards the write and says so.
An unreadable or key-sparse file is not a mismatch and still writes, so a
rotated token is never dropped. Both the CLI and the Electron copy.
2026-09-03 07:59:42 -07:00
..
quota fix(quota): discard a Codex refresh whose login changed under it 2026-09-03 07:59:42 -07:00
cli-win32-reap.test.ts fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test 2026-08-22 10:36:58 -07:00
cli-win32-tree-kill.test.ts fix(app): actually kill the CLI process tree on Windows 2026-09-02 22:10:37 -07:00
cli.test.ts test(app): give the orphan-reaping tests room too 2026-09-02 06:27:46 -07:00
cli.ts fix(app): actually kill the CLI process tree on Windows 2026-09-02 22:10:37 -07:00
main.test.ts fix(app): the tray companion works with only the desktop app installed 2026-09-02 22:10:37 -07:00
main.ts fix(app): typed IPC patches, the staged-msi flag, and honest consent copy 2026-09-03 03:06:13 -07:00
menubar.test.ts fix(app): remember a pending restart across a desktop app restart 2026-09-03 04:52:31 -07:00
menubar.ts fix(app): remember a pending restart across a desktop app restart 2026-09-03 04:52:31 -07:00
preload.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
telemetry.test.ts feat(app): send the CLI's telemetry snapshot and a few interaction events 2026-09-03 01:18:23 -07:00
telemetry.ts feat(app): send the CLI's telemetry snapshot and a few interaction events 2026-09-03 01:18:23 -07:00
tray-settings-atomic.test.ts fix(app): the tray companion works with only the desktop app installed 2026-09-02 22:10:37 -07:00
tray-settings.test.ts fix(app): typed IPC patches, the staged-msi flag, and honest consent copy 2026-09-03 03:06:13 -07:00
tray-settings.ts fix(app): typed IPC patches, the staged-msi flag, and honest consent copy 2026-09-03 03:06:13 -07:00
updates.test.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00
updates.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00