title: Vue.js + Laravel SPA - Socialite stateless Facebook Login
body: <p>First to say that I already implement session based facebook login with laravel socialite and I registered proper facebook acc for developers and create app, but because of SPA I need to change to stateless solution...
  The redirect throws <strong>"Response for preflight is invalid (redirect)"</strong> and check the following config, images and code...</p>
  
  <p>My vue.js app works on <strong>localhost:8080</strong> and backend laravel app on <strong>localhost:8000</strong></p>
  
  <p>I installed barryvdh/laravel-cors an
  d implement standard login with JWTToken</p>
  
  <p>I already install laravel socialite</p>
  
  <p>So, I setup config/services with proper credentials already</p>
  
  <pre><code>    'facebook' =&gt; [
      'client_id' =&gt; 'xxxxxxxx',
      'client_secret' =&gt; 'xxxxxxxxx',
      'redirect' =&gt; 'http://localhost:8000/login/facebook/callback',
  ]
  </code></pre>
  
  <p>I also register a good routes and I tested them 1000 times...</p>
  
  <p>And when a GET send request it cannot be redirected on fb because of Response for preflight is invalid (redirect):</p>
  
  <p><strong>SocialiteController</strong></p>
  
  <pre><code>public function redirectToFacebookProvider()
  {
      return Socialite::driver('facebook')-&gt;stateless()-&gt;redirect(); // this throws error !!!
  }
  </code></pre>
  
  <p>the error which I get in console is like on picture</p>
  
  <p><a href="https://i.stack.imgur.com/8tePP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8tePP.png" alt="enter image description here"></a></p>
  
  <ol>
  <li>It should open to me a popup to login on facebook ? </li>
  <li>Why I have trouble with this redirect ?
  Any help ?</li>
  </ol>