lib/warden/github/strategy.rb in warden-github-1.1.1 vs lib/warden/github/strategy.rb in warden-github-1.2.0
- old
+ new
@@ -68,17 +68,21 @@
if params['state'] != state
abort_flow!('State mismatch')
elsif (error = params['error']) && !error.empty?
abort_flow!(error.gsub(/_/, ' '))
end
+
+ if params['browser_session_id']
+ custom_session['browser_session_id'] = params['browser_session_id']
+ end
end
def custom_session
session[SESSION_KEY] ||= {}
end
def load_user
- User.load(oauth.access_token)
+ User.load(oauth.access_token, custom_session['browser_session_id'])
rescue OAuth::BadVerificationCode => e
abort_flow!(e.message)
end
def state