I am completely stuck with the task of getting the Firebase Authentication to work locally on my simulator.
It used to work but due to an environment change I have to re-configure it.
By now, I have five-times checked if the SHA1 and SHA256 values in the Firebase project are correct.
SHA1: 90:3c:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:84 
SHA256: 32:c2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:c1
From the google-service.json
, I am taking the client_id
which is corresponding witht the certificate_hash
as such:
{
"client_id": "12345667890-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.development",
"certificate_hash": "903cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx84"
}
},
In my react-native app I am using the hard-coded value:
useEffect(() => {
GoogleSignin.configure({
scopes: ['email'],
webClientId: '12345667890-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com',
});
}, []);
But I keep getting keep getting this DEVELOPER_ERROR
without any additional information of what's actually the problem here.
I red somewhere, that we're not supposed to take this client id, instead I am supposed to take the "web" client ID (client_type: 3
):
{
"client_id": "1234567890-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.apps.googleusercontent.com",
"client_type": 3
}
but that didn't change anything.
For my local build, I am running
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
which gives me the same result as running
cd android/ && ./gradlew signingReport
I recently had the same issue. Finally I found out that in the build.gradle file in android/app folder, under signingConfigs -> debug the keystore file did not match with the google-services.json I'm using.
Make sure to check these values:
keytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore
also, note, that you have to use the Web Client ID (client_type: 3
) to make it work:
GoogleSignin.configure({
scopes: ['email'],
webClientId: environment.webClientId,
});