supabase #6

Merged
erman merged 5 commits from supabase into main 2025-06-24 11:29:08 +02:00
3 changed files with 11 additions and 16 deletions
Showing only changes of commit 1760448f73 - Show all commits

View File

@@ -1,7 +0,0 @@
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ locals }) => {
await locals.supabase.auth.signOut();
throw redirect(303, '/');
};

View File

@@ -1,9 +0,0 @@
<script lang="ts">
import { onMount } from 'svelte';
onMount(() => {
localStorage.clear();
});
</script>
<p>Signing out...</p>

View File

@@ -0,0 +1,11 @@
import type { RequestHandler } from './$types';
export const GET: RequestHandler = async ({ locals}) => {
await locals.supabase.auth.signOut();
const html = `
<script>
localStorage.clear();
location.href = '/';
</script>`;
return new Response(html, { headers: { 'Content-Type': 'text/html' } });
};