1
0
Fork 0
mirror of synced 2024-09-28 07:21:35 +12:00

Fixes issue where isEmailVerified was not included

This commit is contained in:
wess 2022-07-14 11:52:23 -04:00
parent a874a25b69
commit 52f5d7d346

View file

@ -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;
}
}