Skip to content

fix: allow re-authenticating an existing account - #120

Open
Bl0ck154 wants to merge 2 commits into
Lampese:mainfrom
Bl0ck154:fix/replace-existing-account-auth
Open

Bl0ck154 wants to merge 2 commits into
Lampese:mainfrom
Bl0ck154:fix/replace-existing-account-auth

Conversation

@Bl0ck154

@Bl0ck154 Bl0ck154 commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #119.

When you try to log in or import an auth.json using a name that is already in the list, the app now asks before replacing it.

If you confirm, it keeps the existing local account entry (including its ID, masking, and timestamps) and replaces the account details and authorization. Cancelling leaves everything untouched. The backend also still rejects duplicates unless the replacement was explicitly confirmed.

I added regression tests for both paths: rejecting an unconfirmed duplicate and refreshing a confirmed ChatGPT account in place.

Testing

  • pnpm build
  • cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
  • I could not run cargo test locally because this Windows environment does not have the MSVC linker (link.exe) installed.

Maintenance triage — 2026-09-30

#138 is an alternative duplicate-login replacement policy that actively refreshes saved sessions. Review it against #185's rotating-token policy. Confirmation-only replacement in #120 is the simpler baseline; neither variant is yet validated for landing.

@Bl0ck154 Bl0ck154 changed the title fix: confirm before replacing existing account authorization fix: allow re-authenticating an existing account Aug 2, 2026
@Lampese Lampese added bug Something isn't working area:auth OAuth, token refresh, identity, activation and reauthentication. priority:P2 Normal maintenance or useful improvement after the P1 queue. status:needs-review Maintainer review required; this label is not merge approval. status:needs-ci No check rollup is visible for the current PR head; validate before landing. labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:auth OAuth, token refresh, identity, activation and reauthentication. bug Something isn't working priority:P2 Normal maintenance or useful improvement after the P1 queue. status:needs-ci No check rollup is visible for the current PR head; validate before landing. status:needs-review Maintainer review required; this label is not merge approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't re-add an expired account with the same name

2 participants