diff --git a/src/Appwrite/Auth/OAuth2/etsy.php b/src/Appwrite/Auth/OAuth2/etsy.php index 06b22ec1bb..6987b1f1e7 100644 --- a/src/Appwrite/Auth/OAuth2/etsy.php +++ b/src/Appwrite/Auth/OAuth2/etsy.php @@ -29,7 +29,7 @@ class Etsy extends OAuth2 /** * @var array */ - protected $scopes = [ + protected array $scopes = [ "address_r", "address_w", "billing_r", @@ -163,6 +163,22 @@ class Etsy extends OAuth2 return $this->getUser($accessToken)['primary_email']; } + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Stripe sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); + } + /** * @param $accessToken * @@ -193,4 +209,6 @@ class Etsy extends OAuth2 return $this->user; } + + }