2
votes

We are using react-native-google-signIn for android in our project. We have created a project in google developer console and downloaded the google-services.json file. The google-services.json file is placed in android/apps folder.

When we configure the googleSignIn in code , am getting error: 10 code from google.

GoogleSignin.configure({
       webClientId:'***********************.apps.googleusercontent.com'
})

If i don't pass the webClientId , the sign-in is successful but idToken is returned as null in the user object.

I made sure that the webClientId value is correct by following [1] and [2].

Any suggestions in this regard will be appreciated.

2

2 Answers

1
votes

Your SHA-1 key may be incorrect. The comment of @mtt87 did help me:

https://github.com/devfd/react-native-google-signin/issues/224

0
votes

I am using firebase and kept getting the same issue until I passed the web client_id from the firebase google-services file into the GoogleSignin.configure method.

await GoogleSignin.configure({
        webClientId: '<unique string>.apps.googleusercontent.com',
      });
const userInfo = await GoogleSignin.signIn();