Skip to content

Commit

Permalink
Add email_verified to linkedin-openid
Browse files Browse the repository at this point in the history
  • Loading branch information
aalyusuf authored Jan 15, 2025
1 parent d1267db commit b1215e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Two/LinkedInOpenIdProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function getBasicProfile($token)
'X-RestLi-Protocol-Version' => '2.0.0',
],
RequestOptions::QUERY => [
'projection' => '(sub,email,name,given_name,family_name,picture)',
'projection' => '(sub,email,email_verified,name,given_name,family_name,picture)',
],
]);

Expand All @@ -77,6 +77,7 @@ protected function mapUserToObject(array $user)
'first_name' => $user['given_name'],
'last_name' => $user['family_name'],
'email' => $user['email'] ?? null,
'email_verified' => $user['email_verified'] ?? null,
'avatar' => $user['picture'] ?? null,
'avatar_original' => $user['picture'] ?? null,
]);
Expand Down

0 comments on commit b1215e1

Please sign in to comment.