Passing "access_type = offline" to get refresh token for Google+?
Created by: ddellacosta
This is more of a help request, as I just don't know how to do it (sorry wasn't sure where to ask). Since this happened,
http://googlecode.blogspot.com/2011/10/upcoming-changes-to-oauth-20-endpoint.html
...I need to figure out how to get the refresh_token using the "access_type = offline" argument. But I just can't figure it out, probably because I don't understand the API/Oauth2 well enough. For example, I've put it in here:
::OAuth2::Client.new(GOOGLE_PLUS_ID, GOOGLE_PLUS_SECRET,
:site => 'https://www.googleapis.com',
:authorize_url => 'https://accounts.google.com/o/oauth2/auth',
:token_url => 'https://accounts.google.com/o/oauth2/token',
:access_type => 'offline'
)
...and I've tried it here too:
@access_token ||= client.auth_code.get_token(@code, :redirect_uri => redirect_url, :access_type => 'offline')
What am I missing here? I either get nothing in the refresh_token field, or I get an Oauth error.
Thanks!