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

feat: update Zoom & Amazon OAuth provider

This commit is contained in:
Christy Jacob 2022-04-28 10:44:09 +03:00
parent 35ac32bd22
commit d52af8afa9
2 changed files with 13 additions and 1 deletions

View file

@ -149,13 +149,17 @@ class Amazon extends OAuth2
/**
* Check if the OAuth email is verified
*
* If present, the email is verified. This was verfied through a manual Amazon sign up process
*
* @param $accessToken
*
* @return bool
*/
public function isEmailVerified(string $accessToken): bool
{
return false;
$email = $this->getUserEmail($accessToken);
return !empty($email);
}
/**

View file

@ -129,12 +129,20 @@ class Zoom extends OAuth2
/**
* Check if the OAuth email is verified
*
* @link https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/user
*
* @param $accessToken
*
* @return bool
*/
public function isEmailVerified(string $accessToken): bool
{
$user = $this->getUser($accessToken);
if (isset($user['verified']) && $user['verified'] === 1) {
return true;
}
return false;
}