feathersjs-ecosystem / feathers-vuex

Integration of FeathersJS, Vue, and Nuxt for the artisan developer

Home Page:https://vuex.feathersjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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