Skip to content

Commit

Permalink
fix: default to known refresh token on Google refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Feb 2, 2024
1 parent 05af22c commit 5e6e996
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Two/GoogleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ protected function getUserByToken($token)
return json_decode($response->getBody(), true);
}

/**
* {@inheritdoc}
*/
public function refreshToken($refreshToken)
{
$response = $this->getRefreshTokenResponse($refreshToken);

return new Token(
Arr::get($response, 'access_token'),
Arr::get($response, 'refresh_token', $refreshToken),
Arr::get($response, 'expires_in'),
explode($this->scopeSeparator, Arr::get($response, 'scope', ''))
);
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 5e6e996

Please sign in to comment.