As per my previous post: Laravel and Vue.js Authentication where I followed the very useful post this did in fact work for getting me around inside the vue router. But once I started making my own Axios calls or using api calls withing my vue’s I ran into a lot of problems with every time I called an api I got unauthenticated.
The solution for me was to move to the tyson/jwt-auth development branch for 1.0 and then configure things from there.
As far as the linked article goes installing the npm/yarn vue side dependencies for
@websanova/vue-auth is all good. This sets the vue environment up to handle the response Authorization header to pass back into the Axios requests.
But what we need to get working is the Laravel/PHP environment to actually authenticate and send out the necessary Authorization header. That’s where I had to go “off piste” and do it differently.
Using: Laravel 5.5, PHP 7.2, JWTAuth 1.0(dev) – as of today 26 July 2018.