nuxt-community / auth-module

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

Sending logout request with payload #1434

Closed kadlinobit closed 2 years ago

kadlinobit commented 2 years ago

Hi, I need to send refresh token in logout request to successfully logout. Is it possible to add a request body to $auth.logout() POST request?

The body should be:

{
    "refresh_token": "gmPd...8wuB"
}
dyehuty commented 2 years ago

Hi, I used this for that purpose:

this.$auth.logout({
  data:{ 
    refresh_token: "gmPd...8wuB"
  }
})
kadlinobit commented 2 years ago

Hi, I used this for that purpose:

this.$auth.logout({
  data:{ 
    refresh_token: "gmPd...8wuB"
  }
})

Hi @dyehuty , I swear I have tried the same thing before and $auth module was sending empty payload. But now it works - I must have had old code cached in the browser or something like that.

Anyway thanks a lot!