Skip to content

Commit

Permalink
switch approved scopes to an array
Browse files Browse the repository at this point in the history
  • Loading branch information
Lindsay Snider committed Jan 18, 2022
1 parent 57d311c commit b765f2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Two/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function user()
return $this->user->setToken($token)
->setRefreshToken(Arr::get($response, 'refresh_token'))
->setExpiresIn(Arr::get($response, 'expires_in'))
->setApprovedScopes(Arr::get($response, 'scope'));
->setApprovedScopes(explode(' ', Arr::get($response, 'scope', '')));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Two/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class User extends AbstractUser
/**
* The scopes the users authorized. These may be a subset of the requested scopes.
*
* @var string
* @var array
*/
public $approvedScopes;

Expand Down Expand Up @@ -74,7 +74,7 @@ public function setExpiresIn($expiresIn)
}

/**
* @param string $approvedScopes
* @param array $approvedScopes
* @return $this
*/
public function setApprovedScopes($approvedScopes)
Expand Down

0 comments on commit b765f2a

Please sign in to comment.