More signout fixes

This commit is contained in:
Roman Krček
2025-06-23 14:18:05 +02:00
parent fe8789af87
commit 1760448f73
3 changed files with 11 additions and 16 deletions

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' } });
};