title: Laravel login with Facebook
body: <p>Frequently got this error when trying to login with Facebook.</p>
  
  <p><code>Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://</code> </p>
  
  <p><a href="https://i.stack.imgur.com/ENd5i.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ENd5i.jpg" alt="Error image"></a></p>
  
  <p>This is what I got.</p>
  
  <p>Provider function:</p>
  
  <pre><code>public function redirectToProvider()
  {
      return Socialite::driver('Facebook')-&gt;redirect();
  }
  </code></pre>
  
  <p>Call back function:</p>
  
  <pre><code>public function handleProviderCallback()
  {
      $user = Socialite::driver('Facebook')-&gt;user();
  }
  </code></pre>