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

Android multiple firebase projects #1146

Closed Splanis closed 1 year ago

Splanis commented 1 year ago

In my project I have 2 android variants, with 2 firebase projects connected, one staging and one production, so 2 'google-services.json' files, one in 'android/app/src/production/' and one in 'android/app/src/staging/'. When building the app on emulator (staging) and trying to sign in, if I use the webClientId from my staging google-services.json I get DEVELOPER ERROR 10. If I use the webClientId from my production file, the flow works fine, and from the JWT I see that the android client_id is the same with this in the production json file. So for some reason the package use the production google-services.json? When I build the app in the appcenter it seems to work fine. Any ideas to overcome this?

vonovak commented 1 year ago

Hello and thanks for asking, it seems that when you're "building the app on emulator (staging)" you're actually building it for production. Try to make sure you're building correctly.

Thank you 🙂