You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$existingAccessToken = getAccessTokenFromYourDataStore();
if ($existingAccessToken->hasExpired()) {
$newAccessToken = $provider->getAccessToken('refresh_token', [
'refresh_token' => $existingAccessToken->getRefreshToken()
]);
// Purge old access token and store new access token to your data store.
}
Can the above be changed to:
$existingAccessToken = getAccessTokenFromYourDataStore();
$existingRefreshToken = getRefreshTokenFromYourDataStore();
if ($existingAccessToken->hasExpired()) {
$tokens = $provider->getAccessToken('refresh_token', [
'refresh_token' => $existingRefreshToken
]);
// Purge old access token and store new access token to your data store.
saveNewAccessTokenToYourDataStore($tokens->getToken());
saveNewExpiryToYourDataStore($tokens->getExpiry());
}
The text was updated successfully, but these errors were encountered:
Hello
I've been working with your oauth2 client example for a few weeks and have some improvements that would have helped me when I started.
https://oauth2-client.thephpleague.com/usage/
Can the above be changed to:
The text was updated successfully, but these errors were encountered: