Fix admin login/logout over HTTP and stale sessions
- Auth cookie was always exported with the SDK default `Secure` flag, so browsers dropped it over plain HTTP (CADDY_SCHEME=http) and login looped back to /login. Set `secure` from the real request scheme. - Logout never ran: the hook redirected every authenticated request to /login (including POST /login?/logout) back to /pages. Only redirect GET. - Refresh the token per request so revoked tokens log the user out instead of surfacing as 500s, and sessions slide instead of expiring mid-edit. - Use `_superusers` instead of the deprecated `pb.admins` alias; keep the entered email on a failed login. - docker-compose: fully-qualified image names (podman rejects short names). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
This commit is contained in:
parent
fd1afc5f3a
commit
1518f1bbbe
3 changed files with 27 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
pocketbase:
|
||||
image: spectado/pocketbase:latest
|
||||
image: docker.io/spectado/pocketbase:latest
|
||||
container_name: massage-pocketbase
|
||||
restart: unless-stopped
|
||||
# Internal only — accessed via the caddy reverse proxy
|
||||
|
|
@ -73,7 +73,7 @@ services:
|
|||
- "3000"
|
||||
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
image: docker.io/library/caddy:2-alpine
|
||||
container_name: massage-caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue