Facebook log-in is broken | Community
Skip to main content
New Participant
March 28, 2017
Solved

Facebook log-in is broken

  • March 28, 2017
  • 12 replies
  • 8302 views

Hey

Today facebook log-in on our web-site stopped working:

28.03.2017 10:54:52.313 *ERROR* [qtp1448280031-74010] com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper Response body is incorrect. Can't extract a token from this: '{"access_token":"EAAJGDvtJEUYBANHEc5fdkYXLtAgDV6YHLcZCU87Rf7EPbTZAH05LqtAs1yZBXC3uLPDvpUpPMZCYEWLZCOdIksfObQ8Eu2gVibrZC1yr2lDvE5GeWt72S2Idsss7IbrhEIBNImkL78JAk82RpyMRCz5WdDMiDO2t8dPQdtINowNgZDZD","token_type":"bearer","expires_in":5112541}' org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract a token from this: '{"access_token":"EAAJGDvtJEUYBANHEc5fdkYXLtAgDV6YHLcZCU87Rf7EPbTZAH05LqtAs1yZBXC3uLPDvpUpPMZCYEWLZCOdIksfObQ8Eu2gVibrZC1yr2lDvE5GeWt72S2Idsss7IbrhEIBNImkL78JAk82RpyMRCz5WdDMiDO2t8dPQdtINowNgZDZD","token_type":"bearer","expires_in":5112541}' at org.scribe.extractors.TokenExtractor20Impl.extract(TokenExtractor20Impl.java:33) at org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:37) at com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper.requestAccessCode(Oauth2Helper.java:124) at com.adobe.granite.auth.oauth.impl.OAuthAuthenticationHandler.extractCredentials(OAuthAuthenticationHandler.java:193) at org.apache.sling.auth.core.impl.AuthenticationHandlerHolder.doExtractCredentials(AuthenticationHandlerHolder.java:75) at org.apache.sling.auth.core.impl.AbstractAuthenticationHandlerHolder.extractCredentials(AbstractAuthenticationHandlerHolder.java:60) at org.apache.sling.auth.core.impl.SlingAuthenticator.getAuthenticationInfo(SlingAuthenticator.java:718) at org.apache.sling.auth.core.impl.SlingAuthenticator.doHandleSecurity(SlingAuthenticator.java:466) at org.apache.sling.auth.core.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:451) at org.apache.sling.engine.impl.SlingHttpContext.handleSecurity(SlingHttpContext.java:121) at org.apache.felix.http.base.internal.service.ServletContextImpl.handleSecurity(ServletContextImpl.java:421) at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:57) at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:124) at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:61) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745)
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Stanleyor

If someone experiencing the same problem:

Finally after 2 weeks we got a hot-fix from Adobe.

The claim in docs that "AEM 6.2 Communities works with FB API 2.5" is a lie. You need a hot-fix to make it work.

12 replies

New Participant
July 5, 2017

Hi all, good news!

In fix pack 6.3 (released on 23, June 2017) we found solution for this issue (among others fixes).

Please follow this link :

Adobe Experience Manager Help | Release Notes: AEM 6.3 Cumulative Fix Pack

Regards

Mateo Recoba

Pablo.Larrosa

Pablo_Larrosa-R
New Participant
April 17, 2017

Thanks for the update Mohit,

Probably wait till the next Feature Pack, the issue is not urgent for us ( for now )

Regards

Employee
April 17, 2017

Hi Pablo,

The hotfix is not public as of now. This fix is officially coming in next Feature Pack. If it's urgent you can get it via Adobe's customer support by opening a RFH for the same.

-Mohit

Pablo_Larrosa-R
New Participant
April 13, 2017

Hi Stanleyor,

We have the exact same issue ( "Response body is incorrect. Can't extract a token from this: " ), can you tell me the hotfix number so I can download it from the package share??

Thanks in advance for your help.

Regards

StanleyorAuthorAccepted solution
New Participant
April 13, 2017

If someone experiencing the same problem:

Finally after 2 weeks we got a hot-fix from Adobe.

The claim in docs that "AEM 6.2 Communities works with FB API 2.5" is a lie. You need a hot-fix to make it work.

StanleyorAuthor
New Participant
April 13, 2017

Hey, JK Kendall

Thank you for your help

JK_Kendall
New Participant
March 30, 2017

Hi Stanley,

I am no expert on this.  All I can do is point out the history of social login for AEM and that AEM 6.2 Communities works with FB API 2.5.

Also, there is sample code for creating an OAuth provider (using LinkedIn as an example) - I don't know if you can do something with that.

I hope someone else will respond to this thread or you could open a support ticket.

I think the key is to understand what did change, because something changed.  If you deployed or changed nothing in AEM, then it suggests something changed coming from Facebook.

If you have a dev system and could quickly try the getting started tutorial and try its Facebook login, perhaps you could get more specific information... ???  It should take you about 10 minutes to setup, author a new site, and then try the social login.  Maybe even then setup a new Facebook app and try it with the dev setup.

Wish I could be of more help - I realize how frustrating this must be.

- JK

StanleyorAuthor
New Participant
March 30, 2017

https://developers.facebook.com/docs/apps/changelog -> Changes from v2.2 to v2.3

[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.

If I understood correctly for version >= 2.3 the response format is JSON. Including the version 2.5.

v2.2 was available until March 25, 2017.

JK_Kendall
New Participant
March 29, 2017

My guess would be to upgrade your Facebook app to use FB API v2.5 or later.

- JK

StanleyorAuthor
New Participant
March 29, 2017

Hey, JK Kendall

I've just updated AEM Communities with AEM-6.2-COMMUNITIES-LIVEFYRE-FEATURE-PACK-2 Version: 1.10.111 but the problem is still there. The feature pack has *not* fixed the problem. Currently we are using Version: 1.10.111

29.03.2017 10:33:47.585 *ERROR* [qtp456392319-11621] com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper Response body is incorrect. Can't extract a token from this: '{"access_token":"EAAJGDvtJEUYBACvrh7nPweWzT254Fr5akEw8akKV6WDIgYSK9FmszwIfZBbvP9yKeqf8yeKv5foKdeYZC45DZBYkM0ZCw3DOfjsBnZAmyAZBtrXDJfoO5p7lfoy9fAAgGL3UNXsP4VSWfNXsJ0izqFknnzAsSNH5ZCZAwnroMZAzhTwZDZD","token_type":"bearer","expires_in":5184000}'
org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract a token from this: '{"access_token":"EAAJGDvtJEUYBACvrh7nPweWzT254Fr5akEw8akKV6WDIgYSK9FmszwIfZBbvP9yKeqf8yeKv5foKdeYZC45DZBYkM0ZCw3DOfjsBnZAmyAZBtrXDJfoO5p7lfoy9fAAgGL3UNXsP4VSWfNXsJ0izqFknnzAsSNH5ZCZAwnroMZAzhTwZDZD","token_type":"bearer","expires_in":5184000}'
        at org.scribe.extractors.TokenExtractor20Impl.extract(TokenExtractor20Impl.java:33)
        at org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:37)
        at com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper.requestAccessCode(Oauth2Helper.java:124)
        at com.adobe.granite.auth.oauth.impl.OAuthAuthenticationHandler.extractCredentials(OAuthAuthenticationHandler.java:193)
        at org.apache.sling.auth.core.impl.AuthenticationHandlerHolder.doExtractCredentials(AuthenticationHandlerHolder.java:75)
        at org.apache.sling.auth.core.impl.AbstractAuthenticationHandlerHolder.extractCredentials(AbstractAuthenticationHandlerHolder.java:60)
        at org.apache.sling.auth.core.impl.SlingAuthenticator.getAuthenticationInfo(SlingAuthenticator.java:718)
        at org.apache.sling.auth.core.impl.SlingAuthenticator.doHandleSecurity(SlingAuthenticator.java:466)
........

Facebook log-in worked on Monday. On Tuesday FB log-in broke. We deployed or changed nothing.