title: I m getting Unauthenticated. on laravel sanctum api
body: <p>so I created the login it worked well but when I want to fetch user posts it returns Unauthenticated even tho I sent the token and used the xsrf cookies but still the same problem </p>
  
  <p>axios call </p>
  
  <pre><code>     axios.defaults.withCredentials = true;
   axios.get('/sanctum/csrf-cookie').then(response =&gt; {
    axios.get('/api/posts/20',{headers:{Authorization: `Bearer ${localStorage.getItem('userToken')}`}}).then(res=&gt;{
      console.log(res);
    })
  </code></pre>
  
  <p>api route</p>
  
  <pre><code>Route::post('login',"UserController@index");
  Route::get('posts/{id}', 'PostController@index')-&gt;middleware('auth:sanctum');
  </code></pre>
  
  <p>please help me guys keep in mind I tried everything out there but nothing works </p>