> On Apr 26, 2016, at 1:40 AM, CouchbaseLover <
sharess...@gmail.com> wrote:
>
> We are thinking about skipping email/password from now on and move to Facebook 100 % with the new AccountKit.
(Speaking personally, I’m against it — I won’t use apps/services that require a Facebook login, and I think it’s a bad idea to tie yourself to one identity provider.)
> We have Web, Android, iOS any pinpoints on how to achieve this smartest?
If it’s like other federated-login systems, the client-side SDK will interact with Facebook servers to generate some kind of token. The app then sends the token to your server, which sends it to Facebook to verify it, and then generates a session and sends it back to the client in a cookie.
So you’ll have to implement a handler on your server (in node.js or Rails or PHP or whatever) that receives the token from the client, verifies it, and requests a session from SG’s admin API.
Sync Gateway already natively supports Facebook logins, btw. (See the admin API’s /db/_facebook handler.)
—Jens