*Nuxt JS Auth* Why after success login with loginWith in template sections auth.loggedIn is true, but in middleware file is false? *Nuxt JS Auth* Why after success login with loginWith in template sections auth.loggedIn is true, but in middleware file is false? vue.js vue.js

*Nuxt JS Auth* Why after success login with loginWith in template sections auth.loggedIn is true, but in middleware file is false?


Ok I couldn't find better solution for this, than changing nuxt's mode to SPA. In SPA everything works, how it should be. Here my nuxt.conf.js fragment for auth module.

export default{  mode: 'spa',  modules: [    '@nuxtjs/axios',    '@nuxtjs/auth'  ],  axios: {    baseURL: 'http://127.0.0.1:8000/api',    browserBaseURL: 'http://127.0.0.1:8000/api'  },  auth: {    strategies: {      local: {        endpoints: {          login: { url: '/auth/token/login/', method: 'post', propertyName: 'auth_token' },          logout: { url: '/auth/token/logout/', method: 'post' },          user: { url: '/auth/users/me/', method: 'get', propertyName: false }        },        tokenRequired: true,        tokenType: 'Token',        tokenName: 'Authorization'      }    },    rewriteRedirects: false,    redirect: {      login: "/login",      logout: "/login",      home: "/",    },  },  router : {    middleware: ['auth'],  }}


my nuxt.config.js also:

auth: { strategies: {  local: {    endpoints: {      login: { url: '/api/login', method: 'post' },      logout: false,      user: false,    },    tokenRequired: true,  },},rewriteRedirects: false, redirect: {  login: '/login',  logout: '/login',  home: '/dashboard',},}