Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Nov 12, 2020
1 parent a4a9103 commit 0ce3285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public function setToken(AccessTokenInterface $token)
$this->setAttribute('token', $token->getToken());
$this->setAttribute('access_token', $token->getToken());

if (!empty($token['refresh_token'])) {
$this->setAttribute('refresh_token', $token['refresh_token']);
if (\is_callable([$token, 'getRefreshToken'])) {
$this->setAttribute('refresh_token', $token->getRefreshToken());
}

return $this;
Expand Down

0 comments on commit 0ce3285

Please sign in to comment.