0
votes

I'm working with laravel as backend (API with Passport) and i have vuetable-2 to handle data in front end. Actualy I'm configuring vuetable-2 with my customers API. First i have configure vuetable with an externa API, then i have configure laravel to work as vuetable-2 expected (format of the json response).

I have tested my api with POSTMAN and it's all working fine.

enter image description here

The problem started when i configure vuetable-2 with my customer API. I allways get:

401 Unauthorized.Unauthenticated.

I have tried adding 'auth:api' to api middleware on kernel.php but nothing change... Any idea?

1

1 Answers

0
votes

The problem was with vuetable-2 and axios. Fixed:

Add to vuetable-2:

:http-fetch="myFetch"

Function:

myFetch(apiUrl, httpOptions) {
                return axios.get(apiUrl, httpOptions)
            }