Skip to content

Commit

Permalink
Merge pull request #22 from viperet/master
Browse files Browse the repository at this point in the history
Update refresh_token when doing Refresh Token Grant flow
  • Loading branch information
mnovozhylov authored Jul 9, 2024
2 parents 2c4e1de + cd93775 commit b61d93f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Upwork/API/AuthTypes/OAuth2ClientLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private function _requestTokens(string $type, array $options)
self::$_accessToken = $accessTokenInfo['access_token'];
self::$_expiresIn = $accessTokenInfo['expires_in'];

if ($type === 'authorization_code') {
if ($type === 'authorization_code' || $type === 'refresh_token') {
$accessTokenInfo['refresh_token'] = $accessToken->getRefreshToken();
self::$_refreshToken = $accessTokenInfo['refresh_token'];
}
Expand Down

0 comments on commit b61d93f

Please sign in to comment.