Skip to content

Commit 9b3755c

Browse files
committed
remove auth item from localstorage after logout
set authentication to false on vuex store
1 parent 8e00294 commit 9b3755c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

public/js/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,10 @@ __webpack_require__.r(__webpack_exports__);
23372337
message: 'Logout Successful!'
23382338
});
23392339

2340+
localStorage.removeItem("auth");
2341+
2342+
_this.$store.commit('SET_AUTHENTICATED', false);
2343+
23402344
_this.$router.push({
23412345
name: 'login'
23422346
});

resources/js/pages/dashboard/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default {
3131
message:'Logout Successful!'
3232
});
3333
34+
localStorage.removeItem("auth");
35+
this.$store.commit('SET_AUTHENTICATED', false);
3436
this.$router.push({ name: 'login' });
3537
});
3638
}

0 commit comments

Comments
 (0)