thephpleague / oauth2-github

GitHub Provider for the OAuth 2.0 Client
MIT License
109 stars 29 forks source link

Refreshing token, #2

Closed craftpip closed 9 years ago

craftpip commented 9 years ago
$token = $provider->getAccessToken('authorization_code', [
    'code' => $_GET['code']
]);

The token returned does not contain refresh token & expire, How do i refresh tokens ?

Thank you,

stevenmaguire commented 9 years ago

Github does not support refresh tokens. From what I have read they also do not "expire" and are assumed to be for "offline use". Therefore the user would have to revoke the token.

In any case, if you needed a new access token, you would need to send the user through the complete OAuth flow again.

You can read more in the official docs and a popular guide.

craftpip commented 9 years ago

Thank you for the support @stevenmaguire