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>
Upon successful login with valid credentials, I can navigate to a specific page. However, the problem arises when I find myself logged out even without explicitly clicking the logout button. This unexpected logout occurs even upon refreshing the page.