3pillarlabs/socialauth — pull request #41 by LorenzoBoccaccia (2014-12-08 09:30:22+00:00)
Title: fix google plus expiration handling

Google plus token expiry is returned as:

"expires_in" : 3596

OAuth2 class only handles strings:

if (jObj.has("expires_in")) {
String str = jObj.getString("expires_in");
if (str != null && str.length() > 0) {
expires = Integer.valueOf(str);
}
}

this code result in a exception being raised:
org.json.JSONException: JSONObject["expires_in"] not a string.

and ultimately fails with:

org.brickred.socialauth.exception.SocialAuthException: Unexpected auth response from https://accounts.google.com/o/oauth2/token

fix issue #30