nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 925 forks source link

Why fetchUser is not working correctly #1755

Closed 93lucasp closed 2 years ago

93lucasp commented 2 years ago

I run a PUT on the user, and after from the response I run setUser()

it is updating my store(vuex) but when i refresh it fetch the old data. It works only if i logout and login again. This is the code, any help?

const user = (await this.$axios.put(/user, this.userScoped)).data;
await this.$auth.setUser(user);
shiroze commented 1 year ago

Can I know what is the solution here to setting user data ? @93lucasp