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>
使用我的登录凭据成功登录后,我可以重定向到某个页面,如果我点击注销,我将成功注销,但问题是即使在登录后没有点击注销按钮,即使我刷新我的页面也是如此退出。