vuex store get reAuth : No accessToken found in storage
anyban opened this issue · comments
async nuxtServerInit ({ commit, dispatch, state }, { req }) {
// eslint-disable-next-line no-console
await initAuth({
commit,
dispatch,
req,
moduleName: 'auth',
cookieName: 'feathers-jwt'
}).then(async (res) => {
if (state.auth.accessToken) {
const qq = await feathersClient.service('users').get(res.sub)
await dispatch('auth/authInit', qq)
}
})
await Promise.all([
dispatch('uploads/init')
])
uploads store
async getUploads ({ commit }, payload) {
await feathersClient
.reAuthenticate()
.then(function (result) {
return result
})
})
init ({ dispatch }) {
return dispatch('getUploads')
}
cant found : No accessToken found in storage