skip to Main Content

I am still new to React Native and I would like to let users use a google account on my React Native app. My question is if signInWithRedirect function is available in native apps. I first wrote signInWithPopup, but I got an error and found out I couldn’t use it in native apps. Also, I used a redirect function, but it didn’t work well.

I deleted all my code and used createUserWithEmailAndPassword, but honestly, I still want users to log in with their google accounts.

2

Answers


  1. Unfortunately, that is not possible in React Native world. It seems that you already have some web experience, so this deep dive might be helpful for you to understand why React Native allows you to use web technologies while developing a native app: https://www.infoq.com/articles/react-native-introduction/

    But the solution you are looking for is react-native-firebase which is the officially recommended collection of packages that brings React Native support for all Firebase services on both Android and iOS apps.

    1. Be sure to follow Firebase Authentication setup instructions: https://rnfirebase.io/auth/usage
    2. Setup Firebase Authentication with google-signin: https://github.com/react-native-google-signin/google-signin
    Login or Signup to reply.
  2. Shorten yourself and use react-native-firebase
    And that using tool Authentication
    But make sure that the application is well connected, then you will get many features that save you time, such as: Dashboard, mail confirmation, and types of login methods (Facebook and …) Even that you can create a login method as a guest

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search