PHP Classes

Problem with refresh token

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  Google OAuth Offline ...  >  All threads  >  Problem with refresh token  >  (Un) Subscribe thread alerts  
Subject:Problem with refresh token
Summary:Problem with refresh token
Messages:2
Author:bolandfranck
Date:2013-05-24 07:58:43
Update:2013-05-25 11:31:48
 

  1. Problem with refresh token   Reply   Report abuse  
Picture of bolandfranck bolandfranck - 2013-05-24 09:22:08
Hi,

For the first, thank you for this class.

I use it for a google api calendar web application.

All work fine, except the offline refresh token.

When i use it after 2 hours, i can't connect to google.

In the offline part of my apps i call functions like that :

if($OAuthClient->Initialize())
{
$Success = $OAuthClient->CallAPI('https://www.googleapis.com/calendar/xxxxxx','GET', array(), array('FailOnAccessError'=>true), $UserData);
}

I have this error : the access token is not set to a valid value\nOAuth client: Query: SELECT id, session, state, access_token, access_token_secret, expiry, authorized, type, server, creation, refresh_token FROM oauth_session WHERE user=? AND server=?
\nOAuth client: The OAuth access token expired in 2013-05-23 16:27:56
\nOAuth client: Error: the access token is not set to a valid value

Can you help me please ?

  2. Re: Problem with refresh token   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-05-25 11:31:48 - In reply to message 1 from bolandfranck
Yes, there was a bug that prevented to retrieve the refresh token from the correct variable. The bug is fixed. A new version will be uploaded soon.