Both this.$auth.token.get() and this.$auth.refreshToken.get() returns as undefined while user is logged in!
Any ideas why?
are you using v5 @nuxtjs/auth-next ? @nuxtjs-auth so then check out the master branch
@iranagame I'm getting the same on most recent commit (@nuxtjs/auth-next": "^5.0.0-1602966760.822bc05). seems odd, did you get around it?
EDIT: this worked, based off this PR https://github.com/nuxt-community/auth-module/commit/bdce83a28b6bc149577cbae15a977b9966ed7cef
this.$auth.strategy.token.get()
and
this.$auth.strategy.refreshToken.get()
i'm in the same situation, so try to downgrade to 4.9.1 but still not working even with @ksherman solution. My work arround was this:
const userToken = $auth.$storage.getUniversal('_token.local')
but I would like to use some other token functions that saw in nuxt-auth docs, but it seems the token object dosn't exist

@iranagame I'm getting the same on most recent commit (
@nuxtjs/auth-next": "^5.0.0-1602966760.822bc05). seems odd, did you get around it?EDIT: this worked, based off this PR bdce83a
this.$auth.strategy.token.get() and this.$auth.strategy.refreshToken.get()
It's work, but why this is not in docs? 馃槶
Most helpful comment
@iranagame I'm getting the same on most recent commit (
@nuxtjs/auth-next": "^5.0.0-1602966760.822bc05). seems odd, did you get around it?EDIT: this worked, based off this PR https://github.com/nuxt-community/auth-module/commit/bdce83a28b6bc149577cbae15a977b9966ed7cef