lib/gds-sso/omniauth_strategy.rb in gds-sso-0.5.0 vs lib/gds-sso/omniauth_strategy.rb in gds-sso-0.5.1
- old
+ new
@@ -39,10 +39,10 @@
def fetch_user_data
@access_token.get('/user.json').body
end
def user_hash
- @user_hash ||= MultiJson.decode(fetch_user_data)
+ @user_hash ||= MultiJson.decode(fetch_user_data)['user']
end
def build_auth_hash
{'uid' => user_hash['uid'], 'user_info' => {'name' => user_hash['name'], 'email' => user_hash['email']}, 'extra' => {'user_hash' => user_hash}}
end