nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.94k stars 925 forks source link

module authenticates even when has error #1842

Open M-Barari opened 1 year ago

M-Barari commented 1 year ago

I'm on "@nuxt": "2.15.8" and "@nuxtjs/auth": "^4.9.1" . I don't know what happened recently but a block of codes that was working perfectly, now has some major issue!!

async login(payload){
  try{
    let res = await this.$auth.loginWith('local',{ data: payload })
    console.log('res',res)
  }catch(e){
    console.log('err',e)
  }
}

even when I get status:401 from backend, the module still authentcate the use and won't go to catch instead the res will be logged in console with status: 401.

zavvla commented 1 year ago

any?