GoogleSignIn.signInAsync: DEVELOPER_ERROR

One question: in docs it says I don’t need to pass in a clientId if I am using google-services.json file. Is this only for iOS, or true for Android too? I was passing in a clientId all this time. I was using the one for client_type: 3. Here is a snippet from my google-services.json file:

“oauth_client”: [
{
“client_id”: “blah1.apps.googleusercontent.com”,
“client_type”: 1,
“android_info”: {
“package_name”: “my-pkg”,
“certificate_hash”: “my-hash”
}
},
{
“client_id”: “another-client-id”,
“client_type”: 3
}
Should I use the clientId for client_type=1 or 3 for a standalone app on Android? Or do I not need to pass in any clientId to GoogleSignIn.initAsync?

i have same issue when trying googleSignIn, is it possible use it without firebase?
Because my package name and SHA-1 already used Oauth 2.0 credential in google (it is using in production apps)
so i cannot register it in firebase.

After looking a lot was this instead of the sha1 key generated from
expo fetch:android:hashes i added to my firebase project the first sha1 key from play store generate new google services json add that key to certificateHash in app json and it worked

1 Like

After a tiring week, I finally realized I actually have to change the fingerprint in the Firebase Android app with the one in the google play console and not the one in the expo fetch:android:hashes.

Exactly the same issue is with me. Have you any fix for this?

Never mind I got it working. :slightly_smiling_face:

By the way if any body reach here following the same issue, this is what you need to do to get it working:
First get “Google Certificate Fingerprint” by using expo fetch:android:hashes command inside your project.

Next add it inside app.json like below:

{
    "expo": {
        "android": {
         "googleServicesFile": "./google-services.json",
            "config": {
                "googleSignIn": {
                    "certificateHash": "<Google Certificate Fingerprint i.e D4:96:80:D0>"
                }
            }
        }
    }
}

Now for firebase setup;
Go to your play console project (current App) inside Setup/App Integrity
Copy SHA-1 certificate fingerprint under App signing key certificate
Paste it to your  firebase android project under SHA certificate fingerprints (Add FingerPrint)
That's all and you get going.

I’m using bare workflow and have the same issue on android. I’ve added the certificateHash from fetch but it doesn’t help. I want to know, do I have to make the changes described here - https://docs.expo.dev/bare/installing-unimodules/ ?
Also, I’ve made the changes described in the firebase console while creating an app there (were those changes required for gradle, etc. ?).
Thanks in advance.

I am also looking for a solution for Android and Bare workflow:

https://github.com/expo/expo/issues/8927#issuecomment-939446442

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.