aboutsummaryrefslogtreecommitdiff
path: root/src/routes/+layout.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-02-06 02:29:07 -0800
committerFuwn <[email protected]>2024-02-06 02:29:07 -0800
commitd1be3ef67a4e403dc9ee76d97b156eda57adafff (patch)
tree4306fe316cb9322317ef0cd1feb016f2eb533b91 /src/routes/+layout.svelte
parentfeat(layout): remove stores using localstorage (diff)
downloaddue.moe-d1be3ef67a4e403dc9ee76d97b156eda57adafff.tar.xz
due.moe-d1be3ef67a4e403dc9ee76d97b156eda57adafff.zip
feat: stronger logout
Diffstat (limited to 'src/routes/+layout.svelte')
-rw-r--r--src/routes/+layout.svelte4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 7f770e7a..dd9533fe 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -2,7 +2,7 @@
import { env } from '$env/dynamic/public';
import { userIdentity as getUserIdentity } from '$lib/AniList/identity';
import { onMount } from 'svelte';
- import userIdentity, { defaultIdentity } from '$stores/identity';
+ import userIdentity from '$stores/identity';
import settings from '$stores/settings';
import { browser } from '$app/environment';
import HeadTitle from '$lib/Home/HeadTitle.svelte';
@@ -134,6 +134,8 @@
localStorage.removeItem('identity');
localStorage.removeItem('commit');
+ document.cookie = 'user=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
+
window.location.href = root('/api/authentication/log-out');
}}
>