Hi,
I have 2 items in Auth0:
- Application - SPA app
- API - Custom API, machine to machine
I have followed the instruction in the link below to call my custom API:
https://auth0.com/docs/quickstart/spa/vuejs/02-calling-an-api
I have downloaded the sample with settings for both items mentioned above. The vue app login correctly and are able to call the external API by using the downloaded codes.
However, when I change the backend to my laravel/lumen app which already set up for item no.2 (custom API), the vue app received 401 unauthorized error. So I copied the access token retrieved through vue:
const accessToken = await this.$auth.getTokenSilently();
console.log(accessToken);
And try to call my lumen app with this access token - it works perfectly fine! Is there a setting somewhere to enable vue & my lumen app to work with auth0? Please advise. Thanks
p/s: The custom lumen API was made following the instruction from link below:
https://auth0.com/blog/developing-restful-apis-with-lumen/