fix: preserve week-long sessions and add profile mascot

This commit is contained in:
Lago committed 2026-10-10 20:40:42 +02:00
1 parent 4e71e9b797
commit 40f24cf5f7
18 files changed
+240 -25

No files matched your search

+25
View File
@@ -1,3 +1,28 @@
# Session Persistence
Logged-in sessions have a seven-day maximum lifetime and seven-day inactivity
timeout (`[auth.sessions]` timebox/inactivity_timeout `168h`). The browser keeps
its Supabase session in persistent storage and refreshes tokens automatically;
users do not need to sign in when an access token expires. Multiple devices are
allowed. Logout, changed passwords, revoked sessions or cleared browser storage
still require authentication. Limits take effect when refresh is attempted, not
by invalidating an already-issued JWT immediately.
On production, set `GOTRUE_SESSIONS_TIMEBOX=168h`,
`GOTRUE_SESSIONS_INACTIVITY_TIMEOUT=168h` and
`GOTRUE_SESSIONS_SINGLE_PER_USER=false` on the existing Auth container. Preserve
the other runtime settings, signing keys, SMTP and image. The deployed JWT expiry
remains 86400 seconds; session lifetime and JWT lifetime are separate settings.
The repository's local JWT expiry remains its existing configured value.
Migration `20261010183614_preserve_sessions_on_unchanged_ticket` prevents the
Pretix `_ensure_auth_user` helper from revoking sessions during unchanged imports.
It locks the user and checks the existing password hash before updating it.
Actual password changes continue to revoke sessions. Existing sessions that were
already deleted cannot be restored; those users need to sign in once.
See [release record](../releases/2026-10-10.md#follow-up-deployments) for the
production backup, verification and deployment boundaries.
# Supabase Core — Local Stack
The Supabase core is a set of Docker containers managed by the **Supabase CLI**
+18
View File
@@ -1,3 +1,21 @@
# Session Persistence Regression
Run the rollback-only fixture after applying
`20261010183614_preserve_sessions_on_unchanged_ticket`:
```sh
docker exec -i supabase_db_Convivo psql -X -U postgres -d postgres \
-v ON_ERROR_STOP=1 < supabase/tests/session_persistence_tests.sql
```
It verifies unchanged repeated imports preserve the existing password hash and
session, changed ticket passwords revoke sessions, and admin password precedence
survives ticket changes. No fixture accounts remain after rollback.
The production Auth policy was additionally verified with a disposable confirmed
test account: actual refresh succeeded at six days, failed after the seven-day
lifetime, and failed after eight-day inactivity. Cleanup removed the test account;
no real email was sent. See [release record](../releases/2026-10-10.md#follow-up-deployments).
# Backend — RPC Test Suite
A self-contained, idempotent test suite for the transactional points RPCs, role