Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Facebook sign in issues

Avatar

Level 4

Hi, I'm having trouble getting Facebook social sign in to work for a forum I'm building. If I click on the 'Login with Facebook' button I get a popup with a Facebook login screen on it, however, after entering login details, AEM returns a message saying Authentication Failed (see attachments).

I have the Adobe Granite OAuth Authentication Handler enabled and I have activated the Facebook Connect cloud service in the root page's properties. Does anyone have any ideas about where I can look next to get this working?

The following is an output from the error log:

14.04.2016 14:51:04.089 *ERROR* [qtp1122471171-589] com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper There was a problem while creating a connection to the remote service. org.scribe.exceptions.OAuthConnectionException: There was a problem while creating a connection to the remote service. at org.scribe.model.Request.send(Request.java:70) at org.scribe.model.Request.send(Request.java:76) at org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:36) at com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper.requestAccessCode(Oauth2Helper.java:124) at com.adobe.granite.auth.oauth.impl.OAuthAuthenticationHandler.extractCredentials(OAuthAuthenticationHandler.java:153) 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:709) at org.apache.sling.auth.core.impl.SlingAuthenticator.doHandleSecurity(SlingAuthenticator.java:461) at org.apache.sling.auth.core.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:446) at org.apache.sling.engine.impl.SlingHttpContext.handleSecurity(SlingHttpContext.java:121) at org.apache.felix.http.base.internal.context.ServletContextImpl.handleSecurity(ServletContextImpl.java:339) at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:334) ... Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source) at sun.net.www.protocol.https.HttpsClient.New(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source) at org.scribe.model.Response.<init>(Response.java:29) at org.scribe.model.Request.doSend(Request.java:117) at org.scribe.model.Request.send(Request.java:66) ... 67 common frames omitted 14.04.2016 14:51:04.089 *WARN* [qtp1122471171-589] com.adobe.granite.auth.oauth.impl.oauth2.Oauth2Helper token was null or not in UNAUTHORIZED state:1 14.04.2016 14:51:04.089 *ERROR* [qtp1122471171-589] com.adobe.granite.auth.oauth.impl.OAuthAuthenticationHandler extractCredentials: Failed to retrieve user identification; cannot authenticate 14.04.2016 14:51:04.089 *INFO* [qtp1122471171-589] org.apache.sling.auth.core.impl.SlingAuthenticator login: No handler for request (7 handlers available) 14.04.2016 14:51:04.089 *ERROR* [qtp1122471171-589] org.apache.sling.auth.core.impl.SlingAuthenticator doLogin: Cannot login: No AuthenticationHandler available to handle the request

Alistair

1 Reply

Avatar

Level 9

See this long thread on Facebook login.  If not helpful, please provide more details, such as versions of AEM Communities and Facebook API being used.

Facebook Login Integration in AEM

- JK