quintonwall/omniauth-rails3-forcedotcom — Issue #2: Refresh Token
Author: dfriedm3
Created: 2011-12-21 18:42:57+00:00
State: open

in forcedotcom.rb in the lib directory, the auth_hash method does not return the refresh token, which can be useful for certain applications, because the auth token that salesforce provides does not have an infinite life span. To include it, you'll need to modify the method to look as follows:

def auth_hash
OmniAuth::Utils.deep_merge(super, {
'instance_url' => @access_token['instance_url'],
'refresh_token' => @access_token['refresh_token']
})
end