Compare commits

..

1 Commits

Author SHA1 Message Date
rjindael b3d94c5913
Remove account e-mail from scope 2023-06-10 23:50:43 -07:00
1 changed files with 1 additions and 3 deletions

View File

@ -12,7 +12,6 @@ class DiscordProvider extends AbstractProvider implements ProviderInterface
* {@inheritDoc} * {@inheritDoc}
*/ */
protected $scopes = [ protected $scopes = [
'email',
'identify', 'identify',
]; ];
@ -56,7 +55,7 @@ class DiscordProvider extends AbstractProvider implements ProviderInterface
$response = $this->getHttpClient()->get($userUrl, [ $response = $this->getHttpClient()->get($userUrl, [
'headers' => [ 'headers' => [
'Authorization' => 'Bearer '.$token, 'Authorization' => 'Bearer ' . $token,
], ],
]); ]);
@ -70,7 +69,6 @@ class DiscordProvider extends AbstractProvider implements ProviderInterface
{ {
return (new User())->setRaw($user)->map([ return (new User())->setRaw($user)->map([
'id' => $user['id'], 'id' => $user['id'],
'name' => $user['username'],
'email' => $user['email'], 'email' => $user['email'],
'avatar' => sprintf('https://cdn.discordapp.com/avatars/%s/%s.png', $user['id'], $user['avatar']), 'avatar' => sprintf('https://cdn.discordapp.com/avatars/%s/%s.png', $user['id'], $user['avatar']),
]); ]);