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 authored and Steven Nguyen committed 2024-05-08 16:35:17 -07:00
1 parent c76e29077c
commit c52bf2a0a1
1 file changed
-9
-9
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 '';
}