oijusti / react-native-firebaseui-auth

Easily add sign-in to your React Native app with FirebaseUI
MIT License
43 stars 10 forks source link

Can't sign in with Google #23

Closed fabyeah closed 3 years ago

fabyeah commented 3 years ago

Email sign in works, but when I try to sign in with Google, I'm getting a toast "Code: 10, Message: 10:" and nothing happens.

fabyeah commented 3 years ago

Google Sign in from the web app (using firebaseui-react) works, so the Firebase/Google setup should be correct.

oijusti commented 3 years ago

Hi @fabyeah, the issue is with android or iOS?

fabyeah commented 3 years ago

@oijusti I tested it with android device

fabyeah commented 3 years ago

It works on iOS.

To make it work on android, it seems like one has to add "SHA certificate fingerprints" to the Android App in the Firebase console project settings.

Kind of cumbersome if you just want to play around and test an app locally without uploading it to Google Play... 🙁

oijusti commented 3 years ago

Good catch!

fabyeah commented 3 years ago

Just for posterity: I actually had the wrong SHA1 set in Firebase. So if you encounter this error, make sure you get the SHA1 from the debug.keystore in your project's android/app folder, NOT from some rogue debug.keystore for example in /Users/<username>/.android/debug.keystore. You can use keytool -keystore debug.keystore -list -v in the project's android/app folder to get the SHA1.

So for development you probably only need that one SHA1 (haven't tried it).