Previously each authclient only supported GET /api/session/validate - the "just gate requests behind a valid session" case. A service that runs its own login/register/admin-user-management screens proxied to AuthGuard (GameStream's pattern, now also used by InfiniteVideo and OutdoorGames) needs much more: register, login, logout, me, totp_enable/verify/disable, password-reset request/confirm, and managed-user list/create/update/delete. The Go client already had this full surface from GameStream's original migration; Python and Node only had validate(), so both gained the same method set as Go, mirroring its behavior and JSON wire shapes exactly (register/login/logout return the raw Set-Cookie values to forward, totp_required surfaces on a 401 from login, etc). Also adds a SetupStatus/ setup_status/setupStatus method (GET /api/setup-status) so a service's own first-launch flow can tell whether AuthGuard already has an account before showing its own account-creation form, and adds totp_enabled to the Go client's PublicUser (AuthGuard has reported it for a while; the client just hadn't picked it up). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gabriel20xx/node-backend
Shared Node.js backend infrastructure for services that use PostgreSQL:
- validated
DATABASE_URLand pool settings; - one pool owner with startup retry, transient query retry, transactions, and shutdown;
- PBKDF2 password hashing and secure session-token helpers;
- short-lived, one-time admin reset codes printed to the server console;
- common account/session persistence;
- transaction-locked ordered migrations.
The package does not depend on Express. Each service keeps its own routes,
cookies, roles, validation policy, and domain repositories. Existing
MediaShared code can be migrated into this package incrementally; keep the
legacy package as a compatibility layer until every consumer has moved.
Pass a service-specific tableName to runMigrations when multiple services
share one PostgreSQL database, so their migration histories cannot collide.
Run npm test from this package or npm run test --workspace=@gabriel20xx/node-backend from shared.