1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

feat: added check for Discord OAuth

This commit is contained in:
Christy Jacob 2022-05-07 14:47:45 +04:00
parent e60338065e
commit dcaa89e75f
2 changed files with 10 additions and 0 deletions

View file

@ -144,12 +144,20 @@ class Discord extends OAuth2
/**
* Check if the OAuth email is verified
*
* @link https://discord.com/developers/docs/resources/user
*
* @param $accessToken
*
* @return bool
*/
public function isEmailVerified(string $accessToken): bool
{
$user = $this->getUser($accessToken);
if (isset($user['verified']) && $user['verified'] === true) {
return true;
}
return false;
}

View file

@ -134,6 +134,8 @@ class Dropbox extends OAuth2
/**
* Check if the OAuth email is verified
*
* @link https://www.dropbox.com/developers/documentation/http/documentation#users-get_current_account
*
* @param $accessToken
*
* @return bool