Search code examples
twitterfirebase-authenticationfacebook-authentication

How to let users login with Twitter AND Facebook (Firebase/Firefeed)


I am working with the Firefeed app (based on Firebase) and I am wondering how I can give users the option to both login with Facebook and Twitter.

I correctly set-up my firebase but I guess the issue is that I either use

authClient.login("facebook");

or

authClient.login("twitter");

How can use both to give them the choice? I know, its probably a beginner questions. :)

Many thanks!


Solution

  • I'm not quite sure what you're looking for here. If you want to allow people to log in with either option, then you can simply have 2 buttons, one that says "Log in with Twitter" and one that says "Log in with Facebook".

    If you want to have an account system that merges multiple social accounts into a single account on your system, so that users could log in with either system and access the same data, this is a little more complex. There's a thorough answer here: How can I login with multiple social services with Firebase?