feat:basic auth
This commit is contained in:
12
src/routes/demo/lucia/+page.svelte
Normal file
12
src/routes/demo/lucia/+page.svelte
Normal file
@@ -0,0 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { enhance } from '$app/forms';
|
||||
import type { PageServerData } from './$types';
|
||||
|
||||
let { data }: { data: PageServerData } = $props();
|
||||
</script>
|
||||
|
||||
<h1>Hi, {data.user.username}!</h1>
|
||||
<p>Your user ID is {data.user.id}.</p>
|
||||
<form method="post" action="?/logout" use:enhance>
|
||||
<button>Sign out</button>
|
||||
</form>
|
||||
Reference in New Issue
Block a user