Revisions for "Need help with Nuxt.js and Nuxt-Auth"

Need help with Nuxt.js and Nuxt-Auth

Hi there.

I'd need help with Nuxt.js

I'm learning Nuxt and I've created the authentication with Nuxt-Auth and Laravel.

The authentication works and when I'm logged in, I can see the user name in the menu:

<li v-if="$auth.loggedIn" class="bold">{{ $auth.user.name }}</li>

But once the session expires, If I click on a different link in the menu, the link with the user name remains in the menu, up to when I hit refresh.

You can see the code here: https://bitbucket.org/danygiguere/bugs/src/master/

I have this getters:

export const getters = {
  authenticated(state) {
    return state.auth.loggedIn
  },

  user(state) {
    return state.auth.user
  },
};

and I tried v-if="authenticated" and v-if="$auth.user" instead of v-if="$auth.loggedIn" but it doesn't change anything.

Help anyone ?

Need help with Nuxt.js and Nuxt-Auth
Hi there. I'd need help with Nuxt.js I'm learning Nuxt and I've created the authentication with Nuxt-Auth and Laravel. The authentication works and when I'm logged in, I can see the user name in the menu: `
  • {{ $auth.user.name }}
  • ` But once the session expires, If I click on a different link in the menu, the link with the user name remains in the menu, up to when I hit refresh. You can see the code here: https://bitbucket.org/danygiguere/bugs/src/master/, Backend: https://bitbucket.org/danygiguere/bugs-backend/src/master/ I have this getters: export const getters = { authenticated(state) { return state.auth.loggedIn }, user(state) { return state.auth.user }, }; and I tried `v-if="authenticated"` and `v-if="$auth.user"` instead of `v-if="$auth.loggedIn"` but it doesn't change anything. Help anyone ?
    Need help with Nuxt.js and Nuxt-Auth
    Hi there. I'd need help with Nuxt.js I'm learning Nuxt and I've created the authentication with Nuxt-Auth and Laravel. The authentication works and when I'm logged in, I can see the user name in the menu: `
  • {{ $auth.user.name }}
  • ` But once the session expires, If I click on a different link in the menu, the link with the user name remains in the menu, up to when I hit refresh. You can see the code here: https://bitbucket.org/danygiguere/bugs/src/master/, Backend: https://bitbucket.org/danygiguere/bugs-backend/src/master/ I have this getters: export const getters = { authenticated(state) { return state.auth.loggedIn }, user(state) { return state.auth.user }, }; and I tried `v-if="authenticated"` and `v-if="$auth.user"` instead of `v-if="$auth.loggedIn"` but it doesn't change anything. Help anyone ?
    Back to question