feat: OTP auth, login dialog, optional PocketBase #8

Merged
toph merged 5 commits from auth into main 2026-02-28 13:22:28 -05:00
Owner

Replaces password-based login with email OTP and moves all auth state server-side.

  • Auth flow is now requestOTPverifyOTP via remote commands (no more form() or authWithPassword)
  • New LoginDialog component rendered globally from root layout, controlled by loginDialog store
  • /login redirects server-side to /?login (opens dialog); /logout route clears cookie and redirects
  • User data comes from page.data.user via +layout.server.ts instead of client-side auth store
  • Removed client-side PocketBase instance ($lib/client/pocketbase.ts) and auth store ($lib/client/auth.svelte.ts)
  • PocketBase is now optional — app degrades gracefully when POCKETBASE_URL is unset
  • Riot API key can be set via RIOT_API_KEY env var (falls back to PB vault)
  • Field component restyled with glass aesthetic (backdrop blur, icon support)
  • Browser ApiClient no longer auto-attaches auth token (httpOnly cookie handles it)
Replaces password-based login with email OTP and moves all auth state server-side. - Auth flow is now `requestOTP` → `verifyOTP` via remote commands (no more `form()` or `authWithPassword`) - New `LoginDialog` component rendered globally from root layout, controlled by `loginDialog` store - `/login` redirects server-side to `/?login` (opens dialog); `/logout` route clears cookie and redirects - User data comes from `page.data.user` via `+layout.server.ts` instead of client-side `auth` store - Removed client-side PocketBase instance (`$lib/client/pocketbase.ts`) and auth store (`$lib/client/auth.svelte.ts`) - PocketBase is now optional — app degrades gracefully when `POCKETBASE_URL` is unset - Riot API key can be set via `RIOT_API_KEY` env var (falls back to PB vault) - `Field` component restyled with glass aesthetic (backdrop blur, icon support) - Browser `ApiClient` no longer auto-attaches auth token (httpOnly cookie handles it)
toph changed target branch from riot-api to main 2026-02-28 02:03:35 -05:00
toph changed title from WIP: authentication to feat: server-side OTP authentication 2026-02-28 11:31:30 -05:00
toph changed title from feat: server-side OTP authentication to feat: OTP auth, login dialog, optional PocketBase 2026-02-28 11:32:28 -05:00
toph merged commit a451917f10 into main 2026-02-28 13:22:28 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
toph/spellbinder!8
No description provided.