philsturgeon / codeigniter-oauth2

NO LONGER ACTIVELY MAINTAINED. USE https://github.com/thephpleague/oauth2-client INSTEAD
http://getsparks.org/packages/oauth2/versions/HEAD/show
351 stars 178 forks source link

RefreshToken class missing (or How to refresh token) #49

Open benjamindavid opened 11 years ago

benjamindavid commented 11 years ago

Hey there, I'm willing to implement refresh token with Google. I've managed to exchange the autorisation token for an access token but can't manage to make it work with refresh token.

From what I see in OAuth 2 provider, the token factory is gonna try to load Token/Refresh.php which doesn't exists.

Am I taking this the wrong way or is this something codeigniter-oauth2 doesn't supports ?

Would love to see a refresh example if possible.

Thanks a lot !

pushpinderbagga commented 10 years ago

I am too interested in knowing the same... There has to be an automated refresh token functionality... not just an on call one...

I however see a grant_type options array missing which doing this

$token = $provider->access($_GET['code']);

If we do a

$token = $provider->access($_GET['code'], array('grant_type'=>'refresh_token'));

It might just be the solution.

Cheers!

radaniba commented 10 years ago

you guys solved that problem ? Am interested in it too

Sonal824 commented 10 years ago

Have you solved it ? am also getting same error .