Open MrJmpl3 opened 4 years ago
@MrJmpl3 I think this may be related to #39. The auth module is being correctly registered, it's just not showing up in the devtools. If you click on a component in the devtools Component mode (first tab), and then switch to console, you can verify this:
console.dir($vm0.$store.state.auth)
// loggedIn: false
â// strategy: "local"
â// user: null
Unfortunately, I believe this to be a bug in the devtools as nuxt-typed-vuex
doesn't change, modify or interfere with the Vue store at all (or in other libraries' access to the store) - it only provides an accessor to it.
Edit 12/17/2020: The method described below is no longer working for me and the bug has returned.
Left the same comment in the other issue but this is how I managed to fix it:
I was having a similar issue with the store state not getting updated in vue dev tools. I managed to fix this by doing the following:
Settings
icon.New Vuex Backend
.I do @ShaggyTech fix in the example, but auth module registration and store of auth module don't show đĸ
@MrJmpl3 i had enabled New Vuex Backend
already, but it's not updating for me either.
@danielroe does it work for you?
Also there's similar behavior, when you rehydrate state from a localstorage with this package: https://github.com/robinvdvleuten/vuex-persistedstate
In a console i see, it's rehydrated, but not in devtools. @danielroe is it on the devtools side problem? Can we report it?
@webcoderkz Yes, I believe this is a bug with devtools.
đ The bug Nuxt Auth cannot register a module in store, look the devtools
đ ī¸ To reproduce https://codesandbox.io/s/distracted-platform-hw4xe
đ Expected behaviour Nuxt Auth can register a module for authentification.
âšī¸ Additional context Nothing