move better-auth demo to auth dir

This commit is contained in:
2026-05-11 13:08:37 +02:00
parent 72337e801c
commit ddfb70adc2
7 changed files with 98 additions and 103 deletions

View File

@@ -0,0 +1,14 @@
<script lang="ts">
import { enhance } from '$app/forms';
import type { PageServerData } from './$types';
let { data }: { data: PageServerData } = $props();
</script>
<h1>Hi, {data.user.name}!</h1>
<p>Your user ID is {data.user.id}.</p>
<form method="post" action="?/signOut" use:enhance>
<button class="rounded-md bg-blue-600 px-4 py-2 text-white transition hover:bg-blue-700"
>Sign out</button
>
</form>