Login through Facebbook

thumbnail
Asad Saeed Awan, modified 8 Years ago. Regular Member Posts: 126 Join Date: 1/16/15 Recent Posts
Hello Community,

I have an android application running successfully using Liferay Sdk and Screenlets. Now I want to add a feature of Login using facebook. Can you please guide me how do I manage this facebook login with Login Screenlet ?

Any help in this regard will be highly appreciated.

Regards,
thumbnail
Javier Gamarra, modified 8 Years ago. Expert Posts: 348 Join Date: 2/12/15 Recent Posts
You have several approaches, the best one is integrating the facebook login as a valid credential in your liferay portal. Apart from that you can:
  • When logged in facebook, use whatever secret information (token, userId), to query an internal table that links between user and that information
  • Supposing that you are using the same email, assume that when logged in correctly in facebook you are already logged-in in liferay portal, query a liferay service (can be generated with service builder) that returns either the password, an OAuth token or a session.
  • Use a SSO solution
thumbnail
Asad Saeed Awan, modified 8 Years ago. Regular Member Posts: 126 Join Date: 1/16/15 Recent Posts
After integrating the facebook login as a valid credential in your liferay portal. How do we connect this thing with our Android App ? Can you please elaborate this a bit further ?

Regards,
thumbnail
Javier Gamarra, modified 8 Years ago. Expert Posts: 348 Join Date: 2/12/15 Recent Posts
Mmm... I'm a bit lost with the login lifecycles + facebook, can you post it in the general forums?

What you can do is use the LoginScreenlet/SessionContext to create a "basic" session but call a custom filter that does the authentication with the facebook credentials.