react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.13k stars 876 forks source link

Configure react-native-google-signin without google-services.json #1136

Closed donaldkwong closed 1 year ago

donaldkwong commented 1 year ago

We do not use the com.google.gms.google-services gradle plugin in our Android app as we need to support multiple Firebase apps. Instead, we call FirebaseApp.initializeApp() with a custom FirebaseOptions object to initialize the app. We're getting a Error: A non-recoverable sign in failure occurred error when trying to sign in with Google and I suspect this is the reason why. Is there a way for us to specify the required parameters (similar to the googleServicePlistPath field when configuring for iOS) at runtime instead of relying on a specific google-services.json file?

Steps to Reproduce

Create a Firebase app that does not use com.google.gms.google-services or google-services.json, but instead creates a Firebase app dynamically at runtime. Integrate react-native-google-signin, attempt to log in, see it fail with error code 12500.

Expected Behavior

Should be allowed to configure the IDs and keys that are required without a google-services.json file.

Actual Behavior

google-services.json file is required and log in fails.

donaldkwong commented 1 year ago

Resolved. Looks like this was actually an issue of not passing in the web client id.