title: Check if Axios has a session cookie
body: <p>I'm implementing a navigation guard for my Vue.js application, checking whether the user is logged in. I think the best way would be to ask Axios if it has a session cookie or not. Something like this:</p>
  <pre><code>router.beforeEach((to, from, next) =&gt; {
    if (Vue.axios.hasSessionCookie())
      next()
    else
      next(false);
  }
  </code></pre>
  <p>Except, of course, <code>hasSessionCookie()</code> doesn't exist, and I don't see anything like it in the docs. Is there a way, maybe by some extension?</p>
  <p>Yes, I know I could store the login status in the VueX store. I don't think it's a good idea because the state would reset if the user, in his infinite wisdom, refreshed the page and thus reset the application. Another solution I have in mind is a backend endpoint where the app can &quot;ask&quot; if it's logged in. But that's also quite lame.</p>