I'm trying to get offline access token (refresh_token) with omniauth google-oauth2 strategy.
This is my omniauth initializer code:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, KEY, SECRET,
:access_type => 'offline',
:scope => 'https://www.googleapis.com/auth/userinfo.profile'
end
When redirecting to google for the oauth2 authentication, it should add an extra URL parameter like &access_type=offline, but it fails to do so (it works fine if I add the parameter manually).
Am I missing something?