Vue Api Service not connected to Laravel Backend API(Sanctum) because of Authorization Token.
Here is my sample code:
import ApiService from "@/core/services/ApiService";
const getUser = async () => {
await ApiService.get('user/me')
.then((resource) => {
console.log(resource)
})
.catch((error) => {
console.log(error)
})
}
Hi Uzzal,
I guess you have to set the Authorization header, you can just save it in local storage with key id_token and it will be included in your request header automatically on each request.