[Vuejs]-Auth0-js: UnauthorizedError: No authorization token was found, though logged in

0👍

Okay, I found the answer on my own … but in case anyone is making the same mistake as I’m doing: I forgot to set the header in the axios.post request, like that:

axios({
  method: 'post',
  url: '/send-sensitive-data',
  data: somedata,
  headers: {
    Authorization: 'Bearer ' + getAccessToken()
  }
})
.then(response => {
  // do something with the response
})

Leave a comment