sharedauth.NewWithStore now treats an empty AUTHGUARD_URL as "pending"
(still gated, failing closed) rather than permanently disabled, so a
ProjectConfigurator-registered CollabTable no longer needs
AUTHGUARD_URL set at all. Add AUTH_DISABLED (default false) to opt
into the old fully-open behavior explicitly via sharedauth.Disabled(),
and update both READMEs/.env.example to document the three resulting
states.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replaces the ~1044-line bespoke session/login/TOTP/admin-user proxy
(backend/auth.go, built directly on authclient) with
sharedauth.NewWithStore, the same shared engine GameStream and
OmniLogger already migrated onto. A tiny collabTableAuthStore adapter
delegates the local one-time setup-claim flag to the existing
collabtable_setup_state table/queries; CollabTable never had a
"require login" toggle, so LoginRequired always reports true and
SetLoginRequired is a no-op.
The local authguard_totp_cache (GetCachedTOTPEnabled/
SetCachedTOTPEnabled) is retired: the shared engine reads TOTP status
live from AuthGuard's GET /api/me. Its table is left in place, same as
the already-dormant auth_users/auth_sessions tables.
URL paths and HTTP methods are unchanged; only response shapes
changed to the shared engine's standardized ones (nested `user: {...}`,
`data: {...}` for TOTP setup/enable/disable). Updated
frontend/src/lib/api.js to translate these back into the shapes the
rest of the frontend already expects, and AppShell.svelte's
saveProfile to always send the current username/email (UpdateMe
requires a non-empty email on every call).
Known behavior differences: POST /api/auth/setup now returns 201
instead of 200; PUT/PATCH /api/auth/users/{id} now returns the updated
user instead of {"ok":true}; POST /api/auth/credentials no longer
forces re-login after a successful change (no bulk session-invalidation
call exists in the shared engine, only single-session Logout).
The separate device/sync API bearer-token scheme (requireAPIToken,
handleTokenStatus/handleTokenRegenerate) is untouched other than
resolving the caller's identity via sharedauth.UserFromContext instead
of local session lookups.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
shared/backend/auth (the mediaauth merge) imports github.com/go-chi/chi/v5
directly now; go.sum needs an entry for it even though this project never
uses chi itself.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The previous commit's edit tool wrote these two files with CRLF endings,
turning a 4-line content change into a full-file diff. Convert back to
LF to match the rest of the codebase; no content change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The local shadcn-style button (default h-9, sm h-8, icon h-9) and select
trigger (h-9) rendered shorter than the search input elsewhere, and
shorter than the shared design system's 2.5rem controls. Collapse all
size variants to h-10 (2.5rem), keeping their padding/font-size
differences.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The select's value was coerced to a string via String(pageSize) while
the <option> values are numbers. Svelte 5 matches a non-bound <select>
value against each option's stored value with Object.is, so "24"
never matched 24 and the dropdown rendered with no option selected.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Swaps the custom paginator.svelte (used on the lists overview and list
detail pages) for the shared @gabriel20xx/web-ui Pagination component,
matching the workspace-wide pagination policy. Data fetching and
client-side slicing logic are unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The shared component library's --sc-primary/--sc-accent/--sc-ring tokens
were only remapped onto CollabTable's own brand color inside AppShell's
.collabtable-shell scope, so anything rendered outside it (the login/setup
AuthPage, the Settings/Profile dialogs) fell back to the shared library's
generic default blue instead of this project's own blue brand. Move that
bridge to app.css so it applies globally, with high-specificity `html`
selectors so it reliably wins over shared-styles.css regardless of import
order.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>