signout route

This commit is contained in:
Roman Krček
2025-06-22 16:16:07 +02:00
parent 8cc59b89da
commit a925fd70f5

View File

@@ -0,0 +1,10 @@
import type { RequestHandler } from './$types';
import { redirect } from '@sveltejs/kit';
export const GET: RequestHandler = async ({ locals }) => {
// If using supabase-js client on the server, you can sign out here
if (locals.supabase) {
await locals.supabase.auth.signOut();
}
throw redirect(303, '/');
};