1
0
Fork 0
mirror of synced 2024-06-11 15:24:45 +12:00

fix(auth): Don't use email in place for name for Apple OAuth2

Apple OAuth2 does not return the user's name in the claims and so we
used email instead, but this can look broken to users and developers to
see an email where the name should be.
This commit is contained in:
Steven Nguyen 2024-05-08 17:57:10 +00:00 committed by Steven Nguyen
parent c76e29077c
commit c52bf2a0a1
No known key found for this signature in database

View file

@ -160,15 +160,6 @@ class Apple extends OAuth2
*/
public function getUserName(string $accessToken): string
{
if (
isset($this->claims['email']) &&
!empty($this->claims['email']) &&
isset($this->claims['email_verified']) &&
$this->claims['email_verified'] === 'true'
) {
return $this->claims['email'];
}
return '';
}