Skip to content

Fix admin logout issue with cookie persistence - #7

Merged
stefan-burke merged 2 commits into
mainfrom
claude/fix-admin-cookie-logout-Z8EIT
Jan 21, 2026
Merged

Fix admin logout issue with cookie persistence#7
stefan-burke merged 2 commits into
mainfrom
claude/fix-admin-cookie-logout-Z8EIT

Conversation

@stefan-burke

Copy link
Copy Markdown
Member

No description provided.

Sessions were being stored in an in-memory Map which caused admin users
to be logged out whenever the server restarted. This moves session
storage to the libsql database for persistence.

- Add sessions table with token and expires columns
- Add createSession, getSession, deleteSession, deleteExpiredSessions
- Update server.ts to use database sessions
- Update tests to use database session functions
Adds a test that scans source files for module-level Map or Set
declarations, which would indicate in-memory state that won't survive
server restarts. This catches regressions like the sessions Map issue.
@stefan-burke
stefan-burke merged commit 15b4393 into main Jan 21, 2026
1 check passed
@stefan-burke
stefan-burke deleted the claude/fix-admin-cookie-logout-Z8EIT branch January 31, 2026 03:26
stefan-burke pushed a commit that referenced this pull request Jul 13, 2026
Records everything shipped (items 1, 6, 3-decision, the compare-and-set flip,
and all eight Codex findings including the accepted paid-stage-prune edge) and
lays out the remaining order of work: #8 admin lifecycle next, then #9 provider
lifecycle, then #10 cleanup, with #5/#7 deliberately parked in TODO.md.
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.

2 participants