React-Native: Facebook and Google Login

I am currently trying to implement facebook and google login for iOS and Android related apps. I must say that it is much less user-friendly than ionic. I've seen some libraries trying to implement this, but they all seem to be no longer supported. Is there a general, robust and stable solution that is easy to implement (if not easy to implement, really any solution that will work), implement facebook and / or google login for responsive apps?

+9


source to share


5 answers


To sign in to Google:

I've tried both https://github.com/devfd/react-native-google-signin and https://github.com/joonhocho/react-native-google-sign-in . And none of them are working properly! I doubt they are more supported.



The final correct solution is https://github.com/fullstackreact/react-native-oauth . It has a very good installation guide and worked very well for my project. It also supports authentication with other providers like Facebook, Twitter, Slack, ...

By the way, for Facebook login https://github.com/facebook/react-native-fbsdk also works well despite the complicated setup.

+8


source


fbsdk is the best option for Facebook. For Google: I am already using react-native-google-signin . It works (for Android at least) as expected. It's a bit tricky to set up, but there is a nice FAQ section provided by the authors.



+2


source


Did you have an answer? I also find a library to implement google auth in reactive and didn’t find a suitable one. but for facebook login you can use this . Because it is done with facebook, so I think it will be in good shape.

+1


source


I tried using react-native-oauth . It may have been a great option once, but now the github documentation is out of date. The documentation talks about using the Identity Toolkit API, which has now moved to Firebase, which is already causing problems. From the API home page :

The newest version of the Google Identity Toolkit has been released as Firebase Authentication.

New projects must use Firebase Authentication. To migrate an existing project from Identity Toolkit to Firebase Authentication, see the Migration Guide.

So the next thing I found was react-native-google-signin . It has a complex procedure, but this middle article helped a lot to implement it in a matter of minutes if you don't want to go into details.

For facebook it is best to use fbsdk .

So the best options would be:
Google : Reaction-native-Google-Signin
Facebook : fbsdk

+1


source


https://github.com/react-native-community/react-native-google-signin seems to be well supported at the moment and just last week I just implemented it in my own product react app.

So I recommend for google authentication.

0


source







All Articles