@@ -0,0 +1,8 @@
+import { redirect } from '@sveltejs/kit';
+import { clearSessionCookie } from '$lib/server/auth.js';
+
+/** @type {import('./$types').PageServerLoad} */
+export function load({ cookies }) {
+ clearSessionCookie(cookies);
+ redirect(303, '/');
+}
@@ -14,6 +14,7 @@
<img class="brand-mark" src={logoMark} alt="" width="28" height="28" />
<span class="brand-name">Torus</span>
</a>
+ <a class="btn btn-ghost" href="/logout">Log out</a>
</header>
<main>