feat(mvp): phase 3 - authentication system

Implement local auth flow: login, registration, logout, JWT access/refresh
tokens in HTTP-only cookies, hooks.server.ts middleware, guest mode support,
Superforms + Zod validation, and reusable auth/authorize middleware.
This commit is contained in:
2026-03-24 20:45:14 +03:00
parent f1b1aa5975
commit 2c001df322
19 changed files with 751 additions and 28 deletions
+19 -2
View File
@@ -1,5 +1,7 @@
<script lang="ts">
// Placeholder — replaced in Phase 5 with the board layout
import type { PageData } from './$types.js';
let { data }: { data: PageData } = $props();
</script>
<svelte:head>
@@ -7,5 +9,20 @@
</svelte:head>
<main class="flex min-h-screen items-center justify-center bg-background text-foreground">
<h1 class="text-4xl font-bold">Web App Launcher</h1>
<div class="text-center">
<h1 class="text-4xl font-bold">Web App Launcher</h1>
{#if data.user}
<p class="mt-4 text-muted-foreground">
Welcome, {data.user.displayName}. No default board is configured yet.
</p>
<form method="POST" action="/auth/logout" class="mt-6">
<button
type="submit"
class="rounded-md bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80"
>
Sign Out
</button>
</form>
{/if}
</div>
</main>