signInMe() {
this.$store.dispatch('setLoggedUser', true);
this.$store.dispatch('setGenericAccessToken', response.data.access_token);
this.errorMessage = "";
}, (error) => {
if (error) {
this.errorMessage = error.response.data.message;
this.isLoginFailed = true;
this.emailFailureCount = this.emailFailureCount + 1;
}
}).catch(error => {})
},
logout() {
localStorage.clear();
localStorage.setItem('userType', "G");
this.$store.dispatch('setLoggedUser', false);
this.$store.dispatch('setAccessToken', '');
this.$router.push('/')
this.registeredUser = false;
},
<div class="myprofileroute" @click="logout">Logout</div>
After logging in successfully with my login credentials, I am able to redirect to some page, and if I click on logout, I am successfully logging out. The issue is even after login without clicking on Logout button, even if I refresh my page it is getting logged out.