title: How to authenticate Vue.js / Axios request of an API route in Laravel
body: <p>I'm in Laravel 5.6. I have all my API routes built out and properly responding to requests from my REST client (Paw). I'm trying to build a simple front end to access those routes.</p>
  
  <p>I'm trying to use Laravel's out-of-the-box features as much as possible, so I'm using Axios to call those routes from a blade template using Vue.js. It works if I disable auth middleware on the test route, but I get 401 errors on the console when auth middleware is enabled for the route.</p>
  
  <p>The problem seems obvious enough... The <code>auth:api</code> guard on my <code>/api</code> routes wants to see an oauth token in the header, but when I log in with the web page it does session authentication. I assume there's a simple way to resolve this without having to spoof an oauth token request in the web frontend, right? Do I need to somehow pass the session token in my request with Axios? And, if so, do I also need to change the <code>auth:api</code> guard in my api routes file?</p>