瀏覽代碼

update logout to clean the localstorage

Daniel Bohry 9 月之前
父節點
當前提交
915c12253d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/routes/logout/+page.svelte

+ 2 - 0
src/routes/logout/+page.svelte

@@ -3,6 +3,8 @@
     import {authentication} from '../store.js';
 
     function logout() {
+        localStorage.removeItem('authentication');
+        authentication.set(null);
         localStorage.clear();
         window.location.href = "/login";
     }