issues25489
p31729568 5 years ago
parent 423dc0e09f
commit 2cd88342e3

@ -37,13 +37,16 @@ module OmniAuth
def raw_info
access_token.options[:mode] = :query
@raw_info ||= access_token.get('/oauth2.0/me').parsed
@raw_info ||= begin
res = access_token.get('/oauth2.0/me')
JSON.parse(res.body.to_s[10..-4])
end
end
def user_info
access_token.options[:mode] = :query
params = { oauth_consumer_key: options.client_id, openid: raw_info['openid'], format: 'json' }
@user_info ||= access_token.get('/user/get_user_info', params: params)
@user_info ||= access_token.get('/user/get_user_info', params: params).parsed
end
end
end

Loading…
Cancel
Save