OAuth2 gem: Response becomes SnakyHash::StringKeyed instance despite snaky: false option
Bug Summary
Despite specifying snaky: false as an argument in the OAuth2::AccessToken#get method of the OAuth2 gem, the response turns into a SnakyHash::StringKeyed instance after a redirect.
Steps to Reproduce
- Use the
OAuth2::AccessToken#getmethod to send a request to an API. - Request an endpoint where a redirect occurs, specifying
snaky: falseas an argument. - Upon checking the response, it's observed that instead of the expected
Hashtype, aSnakyHash::StringKeyedinstance is returned.
Environment and Conditions
- OAuth2 gem version: 2.0.9
Cause
In the OAuth2 gem's OAuth2::Client#execute_request method, this commit introduces params.delete(:snaky), causing the snaky option to be removed when OAuth2::Client#request is called after a redirect.
Expected Behavior
When snaky: false is specified, the response should remain as a Hash type even after a redirect.