Compare commits

..

No commits in common. "kiseki" and "master" have entirely different histories.

1 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,7 @@ class DiscordProvider extends AbstractProvider implements ProviderInterface
* {@inheritDoc} * {@inheritDoc}
*/ */
protected $scopes = [ protected $scopes = [
'email',
'identify', 'identify',
]; ];
@ -55,7 +56,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,
], ],
]); ]);
@ -69,6 +70,7 @@ 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']),
]); ]);