Skip to content

Commit

Permalink
Partial fix for PHPMailer#539
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Oct 23, 2015
1 parent 45bb9a3 commit a4b8b91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions get_oauth_token.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if (!isset($_GET['code'])) {
// If we don't have an authorization code then get one
$authUrl = $provider->getAuthorizationUrl();
$_SESSION['oauth2state'] = $provider->state;
$_SESSION['oauth2state'] = $provider->getState();
header('Location: ' . $authUrl);
exit;
// Check given state against previously stored one to mitigate CSRF attack
Expand All @@ -59,7 +59,7 @@
// echo $token->accessToken.'<br>';

// Use this to get a new access token if the old one expires
echo 'Refresh Token: ' . $token->refreshToken;
echo 'Refresh Token: ' . $token->getRefreshToken();

// Unix timestamp of when the token will expire, and need refreshing
// echo $token->expires;
Expand Down

0 comments on commit a4b8b91

Please sign in to comment.