title: Laravel Socialite: Missing required parameter: redirect_uri
body: <p>I am using Laravel 5.3 with Socialite.</p>
  
  <p>I am getting 400 Bad Request error with message:</p>
  
  <pre><code>Missing required parameter: redirect_uri
  </code></pre>
  
  <p>The URL it generates is:</p>
  
  <pre><code>https://accounts.google.com/o/oauth2/auth?scope=openid+profile+email&amp;response_type=code&amp;state=RYPmT1B93CaUdi44Z7iwfmRPx3hIy7an7yxAVY9l
  </code></pre>
  
  <p>Details below:</p>
  
  <p><strong>service.php</strong></p>
  
  <pre><code>'google' =&gt; [
          'client_id' =&gt; '1234455-u3ifk8tr1qs41487fmevg2h2s1v6ubue.apps.googleusercontent.com',
          'client_secret' =&gt; 'DxSOS0p1xKNuPger3IS_E4-i',
          'redirect' =&gt; 'http://localhost:8000/google/callback',
      ],
  </code></pre>
  
  <p><strong>Routes</strong></p>
  
  <pre><code>Route::get('/{provider}/redirect', 'Auth\RegisterController@redirectToProvider');
  Route::get('/{provider}/callback', 'Auth\RegisterController@handleProviderCallback');
  </code></pre>
  
  <p><strong>Authorized URI settings in Google Console</strong></p>
  
  <pre><code>http://localhost:8000/google/callback
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function handleProviderCallback($provider)
      {
          try {
              $social_user = Socialite::driver($provider)-&gt;user();
  
          } catch (Exception $e) {
              return redirect('/');
          }
  }
  </code></pre>