title: Laravel Socialite: Legacy People API has not been used in project
body: <p>I have used Laravel 5.4 with socialite 3.0 for social login on my web application. But nowadays I got an error <strong>Legacy People API has not been used in project xxx</strong>. Then I have made some changes in a core file of socialite package.
  /vendor/laravel/socialite/src/Two/GoogleProvider.php
  Line 61: Replace <a href="https://www.googleapis.com/plus/v1/people/me" rel="noreferrer">https://www.googleapis.com/plus/v1/people/me</a>? by <a href="https://www.googleapis.com/oauth2/v3/userinfo" rel="noreferrer">https://www.googleapis.com/oauth2/v3/userinfo</a>?</p>
  
  <p>And update mapUserToObject function with below code:</p>
  
  <pre><code>protected function mapUserToObject(array $user)
  {
      $user['id'] = Arr::get($user, 'sub');
      $user['verified_email'] = Arr::get($user, 'email_verified');
      $user['link'] = Arr::get($user, 'profile');
  
      return (new User)-&gt;setRaw($user)-&gt;map([
          'id' =&gt; Arr::get($user, 'sub'),
          'nickname' =&gt; Arr::get($user, 'nickname'),
          'name' =&gt; Arr::get($user, 'name'),
          'email' =&gt; Arr::get($user, 'email'),
          'avatar' =&gt; $avatarUrl = Arr::get($user, 'picture'),
          'avatar_original' =&gt; $avatarUrl,
      ]);
  }
  </code></pre>