Possible fix for sign in with apple migrations failing

This commit is contained in:
George Powell
2026-02-18 17:54:01 -05:00
parent c50cccd3d3
commit e8b2d2e35e
6 changed files with 153 additions and 17 deletions

View File

@@ -1,25 +1,36 @@
<script lang="ts">
import { page } from '$app/state';
import AuthModal from '$lib/components/AuthModal.svelte';
import { page } from "$app/state";
import { browser } from "$app/environment";
import AuthModal from "$lib/components/AuthModal.svelte";
let isOpen = $state(true);
const user = $derived(page.data.user);
const anonymousId = crypto.randomUUID();
let anonymousId = $state("");
$effect(() => {
if (browser) {
anonymousId = localStorage.getItem("bibdle-anonymous-id") ?? "";
}
});
</script>
<div class="min-h-screen bg-gray-900 flex items-center justify-center p-4">
{#if user}
<div class="text-white text-center space-y-4">
<p class="text-lg">Signed in as <strong>{user.email ?? 'no email'}</strong></p>
<p class="text-lg">
Signed in as <strong>{user.email ?? "no email"}</strong>
</p>
<form method="POST" action="/auth/logout">
<button class="px-4 py-2 bg-red-600 rounded-md hover:bg-red-700 transition-colors">
<button
class="px-4 py-2 bg-red-600 rounded-md hover:bg-red-700 transition-colors"
>
Sign Out
</button>
</form>
</div>
{:else}
<button
onclick={() => isOpen = true}
onclick={() => (isOpen = true)}
class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
>
Open Auth Modal