diff --git a/src/User.php b/src/User.php index 44b078a..761ac8f 100644 --- a/src/User.php +++ b/src/User.php @@ -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;