Login lasts 90 days instead of the browser session — Android dropped the session cookie whenever it killed the browser/PWA, forcing a fresh Gitea login + MFA
CI / check (push) Successful in 19s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-11-23 15:04:17 +01:00
1 parent 9148c9a411
commit 2470099877
1 file changed
+5
+5
View File
@@ -80,7 +80,12 @@ module Maptool
# docs/deployment.adoc). Falls back to a random one so the app still # docs/deployment.adoc). Falls back to a random one so the app still
# loads locally/in CI without it set; that fallback just means sessions # loads locally/in CI without it set; that fallback just means sessions
# don't survive a restart there, which is fine outside production. # don't survive a restart there, which is fine outside production.
# expire_after: without it the cookie is a browser-session one, which
# Android drops whenever it kills the browser/PWA — a fresh Gitea
# login + MFA every time on the tablet. Counted from login (only the
# login paths write the cookie, see SkipSessionWrite).
set :sessions, httponly: true, secure: production?, same_site: :lax, set :sessions, httponly: true, secure: production?, same_site: :lax,
expire_after: 90 * 24 * 3600,
secret: ENV.fetch("SESSION_SECRET") { SecureRandom.hex(32) } secret: ENV.fetch("SESSION_SECRET") { SecureRandom.hex(32) }
use SkipSessionWrite use SkipSessionWrite