Files
hledger-web-reports/.changeset/add-shared-authentication.md
eleith 04871e96ac
ci/woodpecker/pr/config Pipeline was successful
ci/woodpecker/pr/hledger Pipeline was successful
ci/woodpecker/pr/jobs Pipeline was successful
ci/woodpecker/pr/snapshots Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/pr/worker Pipeline was successful
ci/woodpecker/push/config Pipeline was successful
ci/woodpecker/push/hledger Pipeline was successful
ci/woodpecker/push/jobs Pipeline was successful
ci/woodpecker/push/snapshots Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/worker Pipeline was successful
feat(web): add shared authentication with route groups
2026-10-31 19:47:54 -07:00

1.1 KiB

@hledger-reports/web, @hledger-reports/worker
@hledger-reports/web @hledger-reports/worker
minor patch

Require shared sign-in with exactly one configured credentials or OIDC strategy. Better Auth owns stateless seven-day sessions without renewal or an authentication database; all admitted users have equal access to the same journal. Progressively enhanced SvelteKit sign-in and native sign-out work with or without JavaScript. Public/protected route groups declare access, enforced by a hook for financial pages, data loads, actions and APIs while retaining the local-only Host/Origin boundary.

Existing private configuration must add url.app and one auth strategy. auth.secret defaults to ${AUTH_SECRET}, must resolve to at least 32 characters and has no random fallback. Worker validates the shared raw contract without resolving web-only secrets. Configuration changes, login and restart never prepare reports or modify journals.

Password/provider changes do not immediately revoke existing stateless cookies; expiry or secret rotation ends those sessions. Public/proxy deployment is not enabled by this change.