title: Laravel socialite - Google auth works locally but not in production: Missing required parameters code
body: <p>I have a problem in my production environment with Laravel Socialite's Google auth. The error is same as on this post: </p>
  
  <p><a href="https://stackoverflow.com/questions/56780015/laravel-socialite-not-working-on-live-server-only-works-on-local-machine">laravel socialite not working on live server, only works on local machine</a></p>
  
  <p>but I have an Apache server and after many tries, I haven't found a solution.</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>Client error: POST "<a href="https://www.googleapis.com/oauth2/v4/token" rel="nofollow noreferrer">https://www.googleapis.com/oauth2/v4/token</a>" resulted in a "400 Bad Request" 
  response:</p>
  
  <pre><code>{
   "error": "invalid_request",
   "error_description": "Missing required parameter: code"
  }
  </code></pre>