feat: update Zoom & Amazon OAuth provider
This commit is contained in:
parent
35ac32bd22
commit
d52af8afa9
|
@ -149,13 +149,17 @@ class Amazon extends OAuth2
|
||||||
/**
|
/**
|
||||||
* Check if the OAuth email is verified
|
* 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
|
* @param $accessToken
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isEmailVerified(string $accessToken): bool
|
public function isEmailVerified(string $accessToken): bool
|
||||||
{
|
{
|
||||||
return false;
|
$email = $this->getUserEmail($accessToken);
|
||||||
|
|
||||||
|
return !empty($email);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -129,12 +129,20 @@ class Zoom extends OAuth2
|
||||||
/**
|
/**
|
||||||
* Check if the OAuth email is verified
|
* Check if the OAuth email is verified
|
||||||
*
|
*
|
||||||
|
* @link https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/user
|
||||||
|
*
|
||||||
* @param $accessToken
|
* @param $accessToken
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isEmailVerified(string $accessToken): bool
|
public function isEmailVerified(string $accessToken): bool
|
||||||
{
|
{
|
||||||
|
$user = $this->getUser($accessToken);
|
||||||
|
|
||||||
|
if (isset($user['verified']) && $user['verified'] === 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue