diff --git a/src/routes/auth/signout/+page.server.ts b/src/routes/auth/signout/+page.server.ts deleted file mode 100644 index 56ad767..0000000 --- a/src/routes/auth/signout/+page.server.ts +++ /dev/null @@ -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, '/'); -}; \ No newline at end of file diff --git a/src/routes/auth/signout/+page.svelte b/src/routes/auth/signout/+page.svelte deleted file mode 100644 index 38bb23b..0000000 --- a/src/routes/auth/signout/+page.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - -

Signing out...

diff --git a/src/routes/auth/signout/+server.ts b/src/routes/auth/signout/+server.ts new file mode 100644 index 0000000..e863937 --- /dev/null +++ b/src/routes/auth/signout/+server.ts @@ -0,0 +1,11 @@ +import type { RequestHandler } from './$types'; +export const GET: RequestHandler = async ({ locals}) => { + await locals.supabase.auth.signOut(); + + const html = ` + `; + return new Response(html, { headers: { 'Content-Type': 'text/html' } }); +}; \ No newline at end of file