title: Laravel Sanctum always have to log back in else 401 Unauthorized when requesting data
body: <p>I'm building a SPA Laravel Sanctum + Vue.js. The issue I'm having is that whenever I launch the &quot;php artisan serve&quot; and open the server, I have to logout and login again in order to send requests, else I'm receiving 401. It happens on all the pages regardless of middleware security level or what they contain as long as they require data from the database. After I log back in, everything works fine.
  Because of my limited knowledge in cookies, I opted to use login with token saved in local and whenever the app is launched, it looks for a token in local storage for remaining logged. Any other information you'd like to know, I'll be keeping my eyes on the question. Thanks.</p>