Fixes issue where isEmailVerified was not included
This commit is contained in:
parent
a874a25b69
commit
52f5d7d346
1 changed files with 19 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue