Spaces:
Sleeping
Sleeping
File size: 581 Bytes
405fa83 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<script lang="ts">
import { authClient } from "$lib/auth-client";
const session = authClient.useSession();
</script>
<div>
{#if $session.data}
<div>
<p>
{$session?.data?.user.name}
</p>
<button
on:click={async () => {
await authClient.signOut();
}}
>
Sign Out
</button>
</div>
{:else}
<button
on:click={async () => {
await authClient.signIn.social({
provider: "huggingface",
});
}}
>
Continue with Hugging Face
</button>
{/if}
</div>
|