We are using liferay-portal-6.2-ce-ga2 community edition. We are trying to integrate facebook login in our portal, but it is not working properly. Users are added/updated successfully with the information obtained from facebook in the com.liferay.portlet.login.action.FacebookConnectAction but when the redirect is sent from login_redirect.jsp it redirects user to login page of the portal instead of logging in the user.
On debugging login_redirect.jsp we found out that control is going into the if part (in the code snippet below) and it is trying to invoke afterlogin method.
But the afterlogin method is not found present in the loaded javascript. Neither we could find this method anywhere except /portal-master/portal-web/docroot/html/taglib/ui/discussion/page.jsp. But this does not look relevant.
Reference code:
if (window.opener) {
[color=#cc1f1f]
var namespace = window.opener.parent.namespace;
var randomNamespace = window.opener.parent.randomNamespace;
var afterLogin = window.opener.parent[randomNamespace + 'afterLogin'];[/color]
afterLogin('<%= HtmlUtil.escape(emailAddress) %>', <%= anonymousAccount %>);
if (<%= !anonymousAccount %>) {
window.opener.parent.Liferay.fire(
'closeWindow',
{
id: namespace + “signInDialog"
}
);
window.close();
}
}
else {
var namespace = window.parent.namespace;
var randomNamespace = window.parent.randomNamespace;
var afterLogin = window.parent[randomNamespace + 'afterLogin'];
afterLogin('<%= HtmlUtil.escape(emailAddress) %>', <%= anonymousAccount %>);
if (<%= !anonymousAccount %>) {
Liferay.fire(
'closeWindow',
{
id: namespace + "signInDialog"
}
);
}
}
Same issue is occurring for Google+ and Linked In login as they also use the same redirection login. Please suggest what we are missing or if this is already a known issue in Liferay.
Thanks