I have used Laravel 5.4 with socialite 3.0 for social login on my web application. But nowadays I got an error Legacy People API has not been used in project xxx. Then I have made some changes in a core file of socialite package. /vendor/laravel/socialite/src/Two/GoogleProvider.php Line 61: Replace https://www.googleapis.com/plus/v1/people/me? by https://www.googleapis.com/oauth2/v3/userinfo?
And update mapUserToObject function with below 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)->setRaw($user)->map([
'id' => Arr::get($user, 'sub'),
'nickname' => Arr::get($user, 'nickname'),
'name' => Arr::get($user, 'name'),
'email' => Arr::get($user, 'email'),
'avatar' => $avatarUrl = Arr::get($user, 'picture'),
'avatar_original' => $avatarUrl,
]);
}