Desktop: mirror the login tokens into the OS keychain (#105, step 1) #254
Merged
jared
merged 1 commits from 2026-09-29 09:34:58 -04:00
desktop-keychain-mirror into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#254
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Step 1 of #105 (the plan in the issue): the desktop app keeps a verified copy of the login tokens in the OS keychain (Windows Credential Manager).
The session is still read from localStorage exactly as before, so nothing about login changes, and a keychain problem can't log anyone out.
Step 2 comes in a later release, once this has run on real installs. It switches reads to the keychain and removes the tokens from localStorage. That's the step that actually takes the tokens off disk.
Changes
sessions.ts: newonSessionPersistedlisteners, called on every write (login, token rotation) and on removal (logout). A throwing listener can't break the write.keychainMirror.ts(desktop only):userId,deviceId,accessTokenandrefreshToken.Tested
Not tested here: the real Windows Credential Manager. That's covered by the Windows test on the desktop PR.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA