I am trying to get Google OAuth to work with Firebase and React Native and cannot get everything to work together. I use the NPM package react-native-google-signin to handle the Google OAuth side and work as expected. I ran into the problem of getting a user using Firebase.
I have enabled Google Authentication in my Firebase instance as instructed in the web guide. However, when I try to authenticate with a field idTokenfrom my own OAuth package, I always get an error INVALID_CREDENTIALSfrom Firebase. I am using the authWithOAuthToken method from the Firebase web interface.
I think I tried every combination of using Web / Android client IDs to configure Firebase and fields idTokenand serverAuthCodefrom the OAuth package, but it all ends with the same error. Has anyone got this to work correctly?
source
share