title: 504 Gateway Time-out nginx/1.15.8 Laravel Socialite
body: <p>Two days now I try to spot an issue with this provider.</p>
  
  <p><strong>MY SETUP</strong>
  PHP VERSION: PHP 7.2.14
  Zend Engine v3.2.0
  Laravel Valet</p>
  
  <p><strong>Clearing cache</strong>
  php artisan cache:clear
  composer dump-autoload</p>
  
  <p><strong>FILE : .env</strong></p>
  
  <pre><code>APP_URL=https://mywebsite.test/
  SESSION_DRIVER=database
  SESSION_LIFETIME=120
  
  FACEBOOK_KEY=19242542********
  FACEBOOK_SECRET=60c3c0a346******
  FACEBOOK_REDIRECT_URI=ht
  </code></pre>
  
  <p>tps://mywebsite.test/login/facebook/callback/</p>
  
  <p><strong>CONFIGURING FACEBOOK CORECTLY</strong></p>
  
  <p><strong>ROUTES</strong></p>
  
  <pre><code>Route::get('login/facebook', 
  'SocialLoginController@redirectToProvider');
  Route::get('login/facebook/callback', 
  'SocialLoginController@handleProviderCallback');
  </code></pre>
  
  <p><strong>CONTROLLER</strong></p>
  
  <pre><code>class SocialLoginController extends Controller
  {
  
  public function redirectToProvider()
  {
      return Socialite::driver('facebook')-&gt;redirect();
  }
  
  /**
   * Obtain the user information from GitHub.
   *
   * @return \Illuminate\Http\Response
   */
  public function handleProviderCallback(Request $request)
  {
      $socialite = Socialite::with('facebook')-&gt;user();
      dd($socialite);
  }
  }
  </code></pre>
  
  <p><strong>ISSUE</strong>
  When I login my account prompts me to continue as the user I am and that works.
  In the database a I see a record in session when I login.
  And I wait for 30"-60" and i get</p>
  
  <p><strong>504 Gateway Time-out nginx/1.15.8</strong></p>