Przeglądaj źródła

update logout to clean the localstorage

Daniel Bohry 9 miesięcy temu
rodzic
commit
915c12253d
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/routes/logout/+page.svelte

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

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