I have updated my rails version to 7, here when I try to get parsed from the oauth response it always returns an empty string, but not the parsed response, but in rails 4 it gave the parsed response.
For example:
in Rails 4
when I print oauth_response1
oauth_response1
#=> #<OAuth2::Response:0x007f65819254d0 @response=#<Faraday::Response:0x007f65913e0370 @env=#<Faraday::Env @method=:post @body="{\"success\":false,\"c_id\":\"343\",\"message\":\"success\"}" @response_headers={"Content-Type"=>"application/json"} @status=200>, @on_complete_callbacks=[]>, @options={:parse=>:automatic}>`
when I used parsed over this, which returns
oauth_response1.parsed
{"success"=>false, "c_id"=>"343", "message"=>"success"}
Similarly the same code in rails 7: when I print oauth_response1
oauth_response1
#<OAuth2::Response:0x00007fa4864912b8 @response=#<Faraday::Response:0x00007fa485ede1e0 @env=#<Faraday::Env @method=:post @request_body="{\"success\":false,\"c_id\":\"343\",\"message\":\"success\"}" @response_headers={"Content-Type"=>"application/json"} @status=200>, @on_complete_callbacks=[]>, @options={:parse=>:automatic}>
and when I give .parsed to this response, it returns an empty string as
oauth_response1.parsed
""
I have been debugging for the same, but can't find the root cause for the same, is there any way to approach this or fix the issue?? and how do the parsed will work?