mirror of
https://github.com/wweir/sower.git
synced 2026-10-19 16:14:33 +00:00
Sessions were stored in memory with a fixed 24h TTL, so every process restart (deploys, crashes) logged everyone out and an active session could still lapse mid-browsing. - Admin sessions now persist to admin.session_file (default /etc/sower/sessions.json, 0600, atomic temp+rename writes). Sessions are restored on startup, dropping already-expired tokens. IO failures degrade to the in-memory store. - Sliding expiry: a session used past the halfway point of its TTL is refreshed instead of left to lapse, so active users stay logged in. Persisting only on refresh bounds disk writes to a couple per session per TTL. - Login, logout, expiry purge, and refresh all sync the file. Verified live: after systemctl restart, the pre-restart cookie still authenticates.