Don't try to set accessType, at least until upstream fixes access to it
This commit is contained in:
parent
c24f242d9b
commit
fe1e8699f0
|
|
@ -47,7 +47,6 @@ if (!isset($_GET['code'])) {
|
||||||
unset($_SESSION['oauth2state']);
|
unset($_SESSION['oauth2state']);
|
||||||
exit('Invalid state');
|
exit('Invalid state');
|
||||||
} else {
|
} else {
|
||||||
$provider->accessType = 'offline';
|
|
||||||
// Try to get an access token (using the authorization code grant)
|
// Try to get an access token (using the authorization code grant)
|
||||||
$token = $provider->getAccessToken(
|
$token = $provider->getAccessToken(
|
||||||
'authorization_code',
|
'authorization_code',
|
||||||
|
|
@ -55,12 +54,7 @@ if (!isset($_GET['code'])) {
|
||||||
'code' => $_GET['code']
|
'code' => $_GET['code']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Use this to interact with an API on the users behalf
|
|
||||||
// echo $token->accessToken.'<br>';
|
|
||||||
|
|
||||||
// Use this to get a new access token if the old one expires
|
// Use this to get a new access token if the old one expires
|
||||||
echo 'Refresh Token: ' . $token->getRefreshToken();
|
echo 'Refresh Token: ' . $token->getRefreshToken();
|
||||||
|
|
||||||
// Unix timestamp of when the token will expire, and need refreshing
|
|
||||||
// echo $token->expires;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue