I integrated plugin on my ionic capacitor app. On iOS, it works. On Android Device I always receve this error:
{"save":false,"callbackId":"29072639","pluginId":"GoogleAuth","methodName":"signIn","success":false,"error":{"message":"Something went wrong","code":"10"}}
I configured all as wiki but I can’t solve.
I have some doubts:
-
Downloaded from firebase console my google-services.json. Is it required? Where I need to save it?
-
I can’t have “capacitor.config.json” file. I have only capacitor.config.ts
-
In google-service.json file there are several codes:
-
What is “serverClientId”?
-
What is the crrect SHA-1 to register at Android Console?
a) That present in Google Play Console?
b) Thant generate from command line (keytool -keystore MYKEYSTORE -list -v)?
My google-services.json file is:
{
"project_info": {
"project_number": "*******",
"project_id": "myapp-c7381",
"storage_bucket": "*******-c7381.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:359711685148:android:5db8f05cc8c23360433dd9",
"android_client_info": {
"package_name": "it.********"
}
},
"oauth_client": [
{
"client_id": "359711685148-aaaaaaaaaaaaaaaaaa.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "it.gemarexpress",
"certificate_hash": "dsadasdasdsadada"
}
},
{
"client_id": "359711685148-kkkk.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "***********"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "359711685148-xxxx.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "359711685148-yyyy.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "**********"
}
}
]
}
}
}
],
"configuration_version": "1"
}
My capacitor.config.ts
As “androidClientId” I used “client.oauth_client.client_id”. The same of there is on Google Cloud Console, OAuth 2.0 Client IDs as “[Android client for it.gemarexpress (auto created by Google Service)]”

plugins: {
GoogleAuth: {
scopes: ['profile', 'email'],
iosClientId: "359711685148-xxx.apps.googleusercontent.com",
androidClientId: "359711685148-yyy.apps.googleusercontent.com",
serverClientId: 'xxxxxx-xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com',
forceCodeForRefreshToken: true,
},
}