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:
parent
c76e29077c
commit
c52bf2a0a1
|
@ -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 '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue