Subject: | The content length limit for error messages is too short |
Hi,
In the params_from_response() subroutine you have this limitation for the response content length:
substr($content, 200) = '...' if length $content > 200;
I've discovered that it's too short for failed get_access_token call in case of Facebook for example. Here is what I get in my log:
"failed oauth call access token: received error: 400 Bad Request
{"error":{"message":"Code was invalid or expired. Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook ha..."
You also don't try to decode_json content when the response status is not 200 and apparently some OAuth2 providers set it as being not successful and pass some meaningful error description in JSON format.