More signout fixes
This commit is contained in:
11
src/routes/auth/signout/+server.ts
Normal file
11
src/routes/auth/signout/+server.ts
Normal 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' } });
|
||||
};
|
||||
Reference in New Issue
Block a user