![]() |
|
Facebook federated login - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: Facebook federated login (/thread-10340.html) |
Facebook federated login - BigLouis87 - 28-08-2012 Is there a way to implement the Facebook login into the federated login plugin? I have to do it but I have no idea how to do this. I think Facebook is today the most social login used, so it should be added among Google, OpenID, Yahoo and others. Facebook federated login - acrylian - 28-08-2012 Possible is nearly everything. The reason it is not in there is that both the developer of it and I don't have FB accounts (the FB page is run by a non developing team member for us). Facebook federated login - sbillard - 28-08-2012 Last time we looked Facebook did not provide an open-id login interface. Maybe that has changed. If so adding Facebook would be simple. If there needs to be some sort of API and a handler for federated logon would need to be written to that API. Facebook federated login - BigLouis87 - 29-08-2012 I searched a bit and found that Facebook uses OAuth 2.0 for login, so federated plugin cannot be used. Its social plugin, using JS SDK, seems to simplify the work, but I haven't understood well how it works. Facebook federated login - acrylian - 29-08-2012 You should maybe take a look at the Twitter plugin which if I recall right also uses OAuth. Probably you can adapt it to do the same or similar for FB. To your last question you will need the object model in any case anyway. For example to get the current logged in admin users so you know which one to log in with. Since ZP can have multiple admins. Facebook federated login - BigLouis87 - 29-08-2012 uhm, I looked to the twitter plugin and it uses OAuth, but it seems a quite complex way to proceed for me. Facebook federated login - sbillard - 29-08-2012 The twitter plugin uses OAuth to log into facebook. What you want is sort of the reverse--if someone is logged into facebook then you want to grant him Zenphoto authorization. If OAuth has the ability to query facebook for the currently logged in user then you would want to build a federated login "handler" that would deal with that. The following is a simple script for logging into Zenphoto "from the outside". ` Facebook federated login - acrylian - 30-08-2012 Quote:The twitter plugin uses OAuth to log into facebook. Facebook federated login - BigLouis87 - 01-09-2012 Thanks Stephan, I studied your script and understood that its core is the static function federated_logon::credentials. Facebook federated login - sbillard - 01-09-2012 Two things: First, federated_logon::credentials returns a result that may be an error message, so you should be sure that you are not getting some kind of logon error. Second, Logon needs to happen sooner than the theme head. If you are not going to make this a federated login handler then you will have to attach to the Facebook federated login - BigLouis87 - 01-09-2012 You're right! Attaching it to the load_theme_script worked. Facebook federated login - sbillard - 01-09-2012 What are the issues with logout? Really the only difference between what you have done and what would happen with a federated_logon handler is that would be executed only during a logon request. (But of course that may be the issue--pretty hard to log out if the page refresh logs you back in!) Anyway, the above script is the best example of a simplified federated_logon handler. Also, the individual handlers supplied are not so complicated if you ignore the It would appear that the difference in what you have already done and what is needed would be to handle the case where the user was not currently logged in to Facebook. Facebook federated login - BigLouis87 - 02-09-2012 The issues with logout was of course that the page re-login me in on a page refresh after a logout, as you said, but I was aware of it, what I wrote was only a simple try to check if it worked. Facebook federated login - micheall - 04-09-2012 Nice to see someone working on this and that it's got some progress, good work BigLouis87! Facebook federated login - callimaco - 10-04-2013 Hi. There are news for this "project" or implementation? Thanks! Facebook federated login - acrylian - 10-04-2013 If there were you would find it on our extensions section. So in short, no. Facebook federated login - jphilbert - 10-04-2013 I am actually working on one and will add it to zenFBSuite Facebook federated login - acrylian - 10-04-2013 Good to hear...;-) |