Open M-Barari opened 2 years ago
Hi, I'm using "nuxt": "^2.15.8" with "@nuxtjs/auth": "^4.9.1" . and my auth config in nuxt.config.js is like this:
"nuxt": "^2.15.8"
"@nuxtjs/auth": "^4.9.1"
nuxt.config.js
auth: { strategies: { local: { endpoints: { login: { url: 'v1/auth/login', method: 'post', propertyName: 'token' }, logout: { url: 'v1/auth/logout', method: 'post' }, user: { url: 'v1/auth/user', method: 'get', propertyName: 'data' } } } }, redirect: { login: '/auth/signin', home: '', logout: '/auth/signin' // callback: '/auth/signin', }, cookie: { prefix: 'auth.', options: { path: '/', maxAge: process.env.AUTH_COOKIE_MAX_AGE } } },
I had this setup in another project and it's working fine, but in my new project when I call:
try { let res = await this.$auth.loginWith('local',{ data: formData }) return res }catch(e){ console.log(e) }
even when I have errors such as 401,411,438,.... it still won't go to catch and send fetchUser call too!!
fetchUser
Hi, I'm using
"nuxt": "^2.15.8"
with"@nuxtjs/auth": "^4.9.1"
. and my auth config innuxt.config.js
is like this:I had this setup in another project and it's working fine, but in my new project when I call:
even when I have errors such as 401,411,438,.... it still won't go to catch and send
fetchUser
call too!!