Persist OAuth sessions across server restarts #72

Open
opened 2026-03-03 15:18:21 -08:00 by fable · 0 comments
Contributor

The current MemoryAuthStore implementation loses all OAuth session state when the server process exits, forcing every user to re-authenticate on restart.

Replace it with a SQLite-backed ClientAuthStore implementation that persists both ClientSessionData (completed sessions) and AuthRequestData (in-flight login state) to the existing database.

This also ensures the in-flight pending_logins map (for AwaitLogin) is the only truly ephemeral state—acceptable to lose on restart since any pending login would need to restart anyway.

Related to #9.

The current `MemoryAuthStore` implementation loses all OAuth session state when the server process exits, forcing every user to re-authenticate on restart. Replace it with a SQLite-backed `ClientAuthStore` implementation that persists both `ClientSessionData` (completed sessions) and `AuthRequestData` (in-flight login state) to the existing database. This also ensures the in-flight `pending_logins` map (for `AwaitLogin`) is the only truly ephemeral state—acceptable to lose on restart since any pending login would need to restart anyway. Related to #9.
puregarlic added this to the Laurence milestone 2026-03-03 15:26:00 -08:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
puregarlic/microclimate#72
No description provided.