React-Native: Facebook and Google Login

DaveTheAl picture DaveTheAl · Jun 15, 2017 · Viewed 27k times · Source

I am currently trying to implement facebook and google login for a react-native app for ios and android. I must say, it is much less user-friendly than ionic for example. I have seen some libraries trying to implement this, but they all seem not to be maintained anymore. Is there any common, reliable and stable solution which is easy to implement (if not easy to implement, really any solution that will work), to implement facebook and/or google login for react-native apps?

Answer

haotang picture haotang · May 7, 2018

For Google Login:

I tried both https://github.com/devfd/react-native-google-signin and https://github.com/joonhocho/react-native-google-sign-in. And neither of them work properly! I'm doubted whether they're maintained anymore.

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

Btw, for Facebook Login, https://github.com/facebook/react-native-fbsdk also works nicely, despite of complex installation.