Files
scan-wave/src/routes/auth/signout/+server.ts
2025-06-23 14:18:05 +02:00

11 lines
351 B
TypeScript

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