[Vuejs]-Getting 401 unauthorized in Laravel passport, vueJS and Axios

0👍

you need to send the token with axios request in the header so the backend knows its legit, you can only do that after you check your backend is working fine with postman, now you can set the axios header like this axios.defaults.baseURL = '/api';
axios.defaults.headers.common['Authorization'] = "Bearer " +
your_token_variable

Leave a comment