I have a problem with the user object in nuxt authorization.
await this.$auth.loginWith('local', {
data: this.form
}).then((res) => {
this.$auth.setUser(res.data.user)
return response;
});
When I log in and redirect me to the subpage for the logged in. On the subpage, I display the user data that I received when logging in. The problem is that when I refresh the page, the user object becomes empty but the login status remains. What's the problem? I'm getting the user object with $ auth.user.username etc.
question from:
https://stackoverflow.com/questions/66050502/reset-store-after-refresh-webpage 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…