title: Laravel Socialite - Facebook extend/replace token with a one with more permissions
body: <p>I'm using <code>Laravel 5.4</code> and <code>Socialite</code> to allow the visitor of my site to log in.</p>
  
  <h3>Situation</h3>
  
  <p>I recently obtained the <code>user_events</code> permission cause I wanted to add some functionalities to my website.</p>
  
  <p>Before this, some users got registered in my database along with their user token in the database. (token than includes the default permissions but not <code>user_events</code>)</p>
  
  <p>I updated the <code>SocialAuthController.php</code> to reflect the new permission on the <strong>new created</strong> user and this is working great</p>
  
  <p><code>return Socialite::driver('facebook')
              -&gt;scopes(['public_profile', 'user_events'])
              -&gt;redirect();</code></p>
  
  <h3>Problem</h3>
  
  <p>If a user is already registered in the database with his token, it is impossible to run this command <code>$fb-&gt;get('me/events')</code> since the token does not include the <code>user_events</code> permissions.</p>
  
  <h3>Questions</h3>
  
  <p>Is there a way to force a user to grab a new token with a new permission without having to remove him from the database ? ( I have data associated with users) ?</p>
  
  <h3>SocialAuthController</h3>
  
  <pre><code>public function handleProviderCallback(SocialAccountService $service)
  {
     $user = $service-&gt;createOrGetUser(Socialite::driver('facebook')-&gt;user());
  }
  </code></pre>
  
  <h3>SocialeAccountService</h3>
  
  <pre><code>public function createOrGetUser(ProviderUser $providerUser)
  {
          $account = SocialAccount::whereProvider('facebook')
              -&gt;whereProviderUserId($providerUser-&gt;getId())
              -&gt;first();
  
          if ($account) {
              return $account-&gt;user;
          } else {
  
              $account = new SocialAccount([
                  'provider_user_id' =&gt; $providerUser-&gt;getId(),
                  'provider' =&gt; 'facebook',
                  'nickname' =&gt; $providerUser-&gt;getNickname(),
                  'avatar' =&gt; $providerUser-&gt;avatar_original,
                  'token' =&gt; $providerUser-&gt;token,
              ]);
  
              $user = User::whereEmail($providerUser-&gt;getEmail())-&gt;first();
  
              if (!$user) {
  
                  $user = User::create([
                      'email' =&gt; $providerUser-&gt;getEmail(),
                      'name' =&gt; $providerUser-&gt;getName(),
  
                  ]);
                }
            $account-&gt;user()-&gt;associate($user);
            $account-&gt;save();
  
            return $user;
  }
  </code></pre>