From 02cecc4eb712e714a506e1c0340c016a533af82a Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 27 Nov 2026 00:30:38 -0500 Subject: [PATCH] docs(api): the session cookie comment says sessions expire server-side, because they do (#8108) Co-Authored-By: Claude Opus 5.5 --- internal/api/auth.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/api/auth.go b/internal/api/auth.go index 89bcc13f..04f6e8ef 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -14,9 +14,10 @@ import ( "git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq" ) -// sessionCookieMaxAge is the cookie lifetime. Sessions don't auto-expire -// server-side yet (future work); the cookie still caps browser-side lifetime -// so an abandoned laptop doesn't stay logged in forever. +// sessionCookieMaxAge is the cookie lifetime, matching the server's idle +// limit: a session unused for 30 days, or a year old, no longer signs anyone +// in (GetSessionByTokenHash), and the browser drops the cookie on the same +// idle clock. const sessionCookieMaxAge = 30 * 24 * time.Hour // Limits on the unauthenticated auth routes other than login (which uses