Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Liferay 7.1 facebook integration
Hello
I have a problem with Liferay 7.1 and Facebook SSO authentication. Version 7.1 brings updates in communication with Facebook, adopting it to some recently implemented FB features like required "Use Strict Mode for Redirect URIs" setting and passing redirect URL details in state parameter. However it does not allow to complete the authentication correctly.
Sequence leading to the problem:
1. User click the link Sign in
2. Sign in dialog is displayed
3. User clicks facebook link to authenticate with Facebook (user is currently logged into Facebook).
4. New browser window appears. System processes several redirects according to the authentication sequence. I can see also communication between Liferay server and facebook graph service (tcpdump), which indicates user token retrieval
5. It ends with following link displayed in the newly opened window: https://<liferay-server>/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin_redirect#_=_
6. The windows is not closed, user is not signed in
7. No entries in Liferay logs folde r,but I can see such entries in catalina...txt file:
- GET /c/portal/facebook_connect_oauth?code=AQByxxxCren6HNzeVs6l2OdefGtpmDNPX2-Mh0jAti5cwnUEzm1jdan8dIm0B2yM80NyV2g9yyFTphhEdBNwr8HMLegQqR1dImzs991rJH7fuuG5TovkpDFJI3uzplAAp9G_b9RbeK8Wyi5MFFlcqcnIt0iz_V9Lordyqgg8fLbdmz4vyvF3-WrM_BtuifTYxx6WoT4ZZQ6zkUKgObJtP3XpBqmseoIg23xxxxxxDaj8vPa8YPcGLunrtpWAJyCr35O1nv3huyHr8_8UI1fpbe6PUyuISfDrew0NOZuvWBi4ae07lrV1IoRgcSx-hrRDnuyQ&state=%7B%22redirect%22%3A%22https%3A%2F%2Fak.compass.info.pl%2Fhome%3Fp_p_id%3Dcom_liferay_login_web_portlet_LoginPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dpop_up%26p_p_mode%3Dview%26_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName%3D%252Flogin%252Flogin_redirect%22%2C%22stateNonce%22%3A%22GHfUB5jM%22%7D HTTP/1.1" 302 -
- GET /home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin_redirect HTTP/1.1" 200 35636
Test performed on liferay-ce-portal-7.1-b3-tomcat/tomcat-9.0.6, Broweser IE 11, Firefox 60, Chrome 67
Liferay FB config:
Application ID : app-id
Application Secret: ••••••••••••••••••••••
Graph URL: https://graph.facebook.com
OAuth Authentication URL : https://graph.facebook.com/oauth/authorize
OAuth Token URL: https://graph.facebook.com/oauth/access_token
Redirect URL : https://<server-name>:443/c/portal/facebook_connect_oauth
Can it be problem with configuration? Please advice
Regards
Maciej Walasek
I have a problem with Liferay 7.1 and Facebook SSO authentication. Version 7.1 brings updates in communication with Facebook, adopting it to some recently implemented FB features like required "Use Strict Mode for Redirect URIs" setting and passing redirect URL details in state parameter. However it does not allow to complete the authentication correctly.
Sequence leading to the problem:
1. User click the link Sign in
2. Sign in dialog is displayed
3. User clicks facebook link to authenticate with Facebook (user is currently logged into Facebook).
4. New browser window appears. System processes several redirects according to the authentication sequence. I can see also communication between Liferay server and facebook graph service (tcpdump), which indicates user token retrieval
5. It ends with following link displayed in the newly opened window: https://<liferay-server>/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin_redirect#_=_
6. The windows is not closed, user is not signed in
7. No entries in Liferay logs folde r,but I can see such entries in catalina...txt file:
- GET /c/portal/facebook_connect_oauth?code=AQByxxxCren6HNzeVs6l2OdefGtpmDNPX2-Mh0jAti5cwnUEzm1jdan8dIm0B2yM80NyV2g9yyFTphhEdBNwr8HMLegQqR1dImzs991rJH7fuuG5TovkpDFJI3uzplAAp9G_b9RbeK8Wyi5MFFlcqcnIt0iz_V9Lordyqgg8fLbdmz4vyvF3-WrM_BtuifTYxx6WoT4ZZQ6zkUKgObJtP3XpBqmseoIg23xxxxxxDaj8vPa8YPcGLunrtpWAJyCr35O1nv3huyHr8_8UI1fpbe6PUyuISfDrew0NOZuvWBi4ae07lrV1IoRgcSx-hrRDnuyQ&state=%7B%22redirect%22%3A%22https%3A%2F%2Fak.compass.info.pl%2Fhome%3Fp_p_id%3Dcom_liferay_login_web_portlet_LoginPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dpop_up%26p_p_mode%3Dview%26_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName%3D%252Flogin%252Flogin_redirect%22%2C%22stateNonce%22%3A%22GHfUB5jM%22%7D HTTP/1.1" 302 -
- GET /home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin_redirect HTTP/1.1" 200 35636
Test performed on liferay-ce-portal-7.1-b3-tomcat/tomcat-9.0.6, Broweser IE 11, Firefox 60, Chrome 67
Liferay FB config:
Application ID : app-id
Application Secret: ••••••••••••••••••••••
Graph URL: https://graph.facebook.com
OAuth Authentication URL : https://graph.facebook.com/oauth/authorize
OAuth Token URL: https://graph.facebook.com/oauth/access_token
Redirect URL : https://<server-name>:443/c/portal/facebook_connect_oauth
Can it be problem with configuration? Please advice
Regards
Maciej Walasek
Hey Maciej,
7.1 is still in Beta so you might not have a lot of success finding answers here yet. You might have found a bug -- I would suggest maybe checking in over here: https://dev.liferay.com/en/web/liferay-7.1-community-beta-program/welcome
Folks over there are more actively kicking the tires on 7.1 and if you have found an issue, it's the right place to report it right now (I think)
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™