Skip to content

fix(auth): preserve sessions across app restarts - #198

Merged
Blankll merged 1 commit into
masterfrom
codex/fix-session-persistence
Oct 28, 2026
Merged

Blankll merged 1 commit into
masterfrom
codex/fix-session-persistence

Conversation

@Blankll

@Blankll Blankll commented Oct 28, 2026

Copy link
Copy Markdown
Member

Reopening SQLKit after the access token expires can sign the user out because device activation serializes the refresh token under a different key than the frontend reads. Save the activation lease correctly and keep replacement credentials synchronized through both command results and events.

  • Register session listeners and consume pending authentication before restoring a saved login; deduplicate repeated handoffs.
  • Ignore asynchronous results from older logins or already-replaced leases, and clear account-scoped UI state when a new login arrives.
  • Share successful renewal results across concurrent callers, including queued requests across sleep/resume; allow an access-only session to repair its missing lease despite the activation throttle.
  • Add regressions for IPC serialization, persisted restoration, transient failures, concurrent rotation, missed events, and stale responses.

Validation:

  • npm test and cargo test --manifest-path src-tauri/Cargo.toml --lib: 855 frontend tests and 598 Rust tests passed; one existing Rust test ignored.
  • npm run build passed.
  • npm run lint:check passed.

@Blankll
Blankll merged commit 45d41d3 into master Oct 28, 2026
3 checks passed
@Blankll
Blankll deleted the codex/fix-session-persistence branch October 28, 2026 07:41
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.

1 participant