intridea/oauth2 — Issue #87: auth_code.get_token raise error
Author: shouaya
Created: 2012-01-17 02:10:18+00:00
State: open

i just fix it with :

response = request(options[:token_method], token_url, opts)
parsed = JSON::parse(response.parsed)
raise Error.new(response) unless parsed.is_a?(Hash) && parsed['access_token'] #
AccessToken.from_hash(self, parsed.merge(access_token_opts))

[response.parsed] is String and will raise error allows i think