Closed velika12 closed 7 years ago
unless the response changed, this appears to be a bug - can you tried the latest version and see if it still appears?
I have got the same issue today as well. Yesterday Connect with Facebook was working. Is there a chance that Facebook has changed something on their side?
We use version 0.7.1.
I have same issue. Using 0.8.1 version.
Sounds like something widespread - can someone investigate further (@velika12, @gkovbasenko, @makxx91)? I can release a version with a fix and backport it to 0.7.x
.
About MyFacebookAuthInfo
and the Facebook response JSON. From facebook changelog - https://developers.facebook.com/docs/apps/changelog in section "Changes from v2.2 to v2.3"
we can see that it always was expires_in
and not expires
[Oauth Access Token] Format - The response format of https://www.facebook.com/v2.3/oauth/access_token returned when you exchange a code for an access_token now return valid JSON instead of being URL encoded. The new format of this response is {"access_token": {TOKEN}, "token_type":{TYPE}, "expires_in":{TIME}}. We made this update to be compliant with section 5.1 of RFC 6749.
Provided code by @velika12 helped me to resolve this issue.
Do you want to open a pull request for this?
On 29 Mar. 2017 8:19 pm, "gkovbasenko" notifications@github.com wrote:
Provided code by @velika12 https://github.com/velika12 helped me to resolve this issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/joscha/play-authenticate/issues/334#issuecomment-290032561, or mute the thread https://github.com/notifications/unsubscribe-auth/AALehsuezBmRVhkOIFY4CXxFVTEcMJJQks5rqiIJgaJpZM4MreZ2 .
I have done this in our custom class that we had created before and that extends FacebookAuthProvider. I could create a new PR for the 0.7.1 version.
Based on the API changelog (thanks @makxx91) it looks like Facebook turned off API v2.2 this past Saturday, March 25, so that's why the response changed format.
Based on @gkovbasenko's PR I could create a PR for Play 2.3. Think all Play versions need a fix for this problem.
@cnmuc :thumbsup:
fixed in 0.8.3
via #336
Hello, we have recently moved to 0.7.1 version of Play Authenticate and got an weird exception today (the stacktrace is at the bottom). It seems like the response body from Facebook server happens to be in json format, but in
FacebookAuthProvider
you treat it as right formatted query parameter stringI have managed to fix it writing my own
MyFacebookAuthProvider
with the methodI also had to change the constructor of
MyFacebookAuthInfo
this way as one of the fields in json response is notexpires
butexpires_in
.Am I doing smth wrong or is there really a bug in your provider?
Here is the stacktrace: