diff --git a/src/Appwrite/Auth/OAuth2/Slack.php b/src/Appwrite/Auth/OAuth2/Slack.php index 344790c162..f61c776d41 100644 --- a/src/Appwrite/Auth/OAuth2/Slack.php +++ b/src/Appwrite/Auth/OAuth2/Slack.php @@ -141,13 +141,9 @@ class Slack extends OAuth2 */ public function isEmailVerififed(string $accessToken): bool { - $user = $this->getUser($accessToken); + $email = $this->getUserEmail($accessToken); - if (isset($user['user']['email'])) { - return true; - } - - return false; + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Stripe.php b/src/Appwrite/Auth/OAuth2/Stripe.php index c136ce5599..5cfceaacae 100644 --- a/src/Appwrite/Auth/OAuth2/Stripe.php +++ b/src/Appwrite/Auth/OAuth2/Stripe.php @@ -144,13 +144,16 @@ class Stripe extends OAuth2 /** * Check if the OAuth email is verified * + * Stripe emails if present are verfied. + * * @param $accessToken * * @return bool */ public function isEmailVerififed(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + return !empty($email); } /**