vue-auth: Login problems

When I sign out and I try to sign in again with correct credentials, sometimes I’m getting a devise error saying that my email or password is wrong. But, they are correct. So, I saw my browser session’s storage with the token information. I suppose this is responsible for my error, but I don’t understand why. Could you help me to solve that? I’m using version 3 and sending my plugin configurations:

export default Vue.use(auth, {
  auth: authBasic,
  http: httpAxios,
  router: routerVueRouter,

  registerData: {
    url: RESOURCE_URL,
    method: 'POST',
    fetchUser: true,
    staySignedIn: true,
    redirect: '/finishedSignUp'
  },

  loginData: {
    url: `${RESOURCE_URL}/sign_in`,
    method: 'POST',
    redirect: '/home',
    fetchUser: true,
    staySignedIn: true
  },
  logoutData: {
    url: `${RESOURCE_URL}/sign_out`,
    method: 'DELETE',
    redirect: '/',
    makeRequest: true
  },

  refreshData: {
    url: `${RESOURCE_URL}/validate_token`,
    method: 'GET',
    enabled: true,
    interval: 30
  },

  fetchData: {
    url: `${RESOURCE_URL}/validate_token`,
    method: 'GET',
    enabled: true,
    interval: 30
  }
}

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

You’re over thinking it. The plugin just preforms http requests so you can send whatever you want as long as you send back a token.

So you can send a request with no paramus for all it cares. In your case just take an email and send back a token on login.

They will get a session and next time they will use the password that’s emailed.