Skip to content

fix: keep newly added accounts inactive - #141

Open
legibet wants to merge 1 commit into
Lampese:mainfrom
legibet:fix/oauth-add-without-switch
Open

fix: keep newly added accounts inactive#141
legibet wants to merge 1 commit into
Lampese:mainfrom
legibet:fix/oauth-add-without-switch

Conversation

@legibet

@legibet legibet commented Aug 30, 2026

Copy link
Copy Markdown

Summary

  • Keep newly added OAuth accounts inactive.
  • Preserve active_account_id when adding an account, including the first account.
  • Add one storage regression test covering empty and active stores.

Why

OAuth completion currently writes the new account directly to ~/.codex/auth.json. This bypasses the process guard and token-preservation flow used by Switch.

After this change, adding an account only stores it. The user activates it through the existing Switch action.

Checks

  • cargo test --manifest-path src-tauri/Cargo.toml: 51 passed
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets: completed with pre-existing warnings
  • pnpm build: passed
  • pnpm test:reset-credits: 3 passed
  • git diff --check: passed

Related

@legibet
legibet force-pushed the fix/oauth-add-without-switch branch from ec371e1 to 720c8bc Compare September 10, 2026 10:46
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.

OAuth login bypasses safe account switching when adding an account

1 participant