Login   Register  
PHP Classes
elePHPant
Icontem

OAuth Refresh tokens for box Api and Google Api

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP OAuth API  >  All threads  >  OAuth Refresh tokens for box Api and Google Api  >  (Un) Subscribe thread alerts  
Subject:OAuth Refresh tokens for box Api and Google Api
Summary:Google OAuth offline access and Box api 'refresh tokens'
Messages:3
Author:Steve Penn
Date:2013-02-12 10:56:18
Update:2013-03-15 08:26:32
 

  1. OAuth Refresh tokens for box Api and Google Api   Reply  
Picture of Steve Penn
Steve Penn
2013-02-12 10:56:18
I have been looking through the classes within this plugin and i have found it very useful for box, but for the implementation with google (the preferred service) there is no offline access (again which gathers an OAuth "refresh token" (as per the OAuth 2.0 spec)). i was wondering if there was a chance that you could help me add to the class to meet these aims or develop a plugin to accomplish this.

ps. i managed to get both access and refresh tokens with the class (after a couple of edits) and have it refresh automatically but with the google api it is more about the actual request being sent to google requesting 'offline' access -This is where the main issue is-

  2. Re: OAuth Refresh tokens for box Api and Google Api   Reply  
Picture of Manuel Lemos
Manuel Lemos
2013-03-03 09:32:12 - In reply to message 1 from Steve Penn
Sorry for the delay. I plan to add support to refresh tokens soon. I will get back here when I will make some progress.

  3. Re: OAuth Refresh tokens for box Api and Google Api   Reply  
Picture of Manuel Lemos
Manuel Lemos
2013-03-15 08:26:32 - In reply to message 1 from Steve Penn
I have just added support for refresh tokens.

You need to set the offline variable so it uses the correct dialog URL to ask for offline access and Google API returns the refresh_token.