Clear token on signout
All checks were successful
Build Docker image / build (pull_request) Successful in 4m39s
All checks were successful
Build Docker image / build (pull_request) Successful in 4m39s
This commit is contained in:
11
src/routes/auth/signout/+page.svelte
Normal file
11
src/routes/auth/signout/+page.svelte
Normal file
@@ -0,0 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
onMount(() => {
|
||||
localStorage.clear();
|
||||
goto('/');
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Signing out...</p>
|
||||
@@ -6,5 +6,4 @@ export const GET: RequestHandler = async ({ locals }) => {
|
||||
if (locals.supabase) {
|
||||
await locals.supabase.auth.signOut();
|
||||
}
|
||||
throw redirect(303, '/');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user