title: API authentication with Socialite
body: <p>I have implemented API authentication using Passport and trying to do the same using Socialite but I am getting runtime exception error </p>
  
  <blockquote>
    <p>Session store not set on request</p>
  </blockquote>
  
  <p>This is what the endpoints look like following the laravel 5.8 documentation</p>
  
  <pre><code>Route::get('login/facebook', 'AuthController@facebookRedirect');
  
  Route::get('login/facebook/callback', 'AuthController@facebookCallback');
  </code></pre>
  
  <p>In service.php file I have added facebook key like so</p>
  
  <pre><code>'facebook' =&gt; [
      'client_id'     =&gt;  env('FACEBOOK_CLIENT_ID'),
      'client_secret' =&gt; env('FACEBOOK_CLIENT_SECRET'),
      'redirect'      =&gt; env('FACEBOOK_CALLBACK_URL'),
  ],
  </code></pre>
  
  <p>And the <code>AuthController</code> methods are </p>
  
  <pre><code>public function facebookRedirect()
  {
      return Socialite::driver('facebook')-&gt;redirect();
  }
  
  public function facebookCallback()
  {
      return Socialite::driver('facebook')-&gt;stateless()-&gt;user();
  
      $user-&gt;token;
  }
  </code></pre>
  
  <p>In Postman and my browser I have called the api end point like this
  <code>http://localhost:8000/api/v1/login/facebook</code></p>
  
  <p>What am I doing wrong? Is this the way to do API authentication using socialite?</p>