cordova-plugin-googleplus
cordova-plugin-googleplus copied to clipboard
Which webClientId to use where?
The plugin installation requires WEB_APPLICATION_CLIENT_ID
and the actual login requires (for Android) webClientId
. In my google-services.json, I have:
"oauth_client": [
{
"client_id": "KEY_AAA.apps.googleusercontent.com",
"client_type": 3
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "KEY_AAA.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "KEY_BBB.apps.googleusercontent.com",
"client_type": 2
}
]
}
}
I'm confused which key I should use to what. I understand REVERSED_CLIENT_ID
, this is provided just once in GoogleService-Info.plist. But which one of these should be passed:
- in plugin configuration (package.json / config.xml)
- during login call? (should it be always the same, or different for ios / android?)
Sigh, I'm stupid. client_type = 2 is the key that is then used as reversed client id (in a reversed form, of course). So:
- WEB_APPLICATION_CLIENT_ID and webClientId is the same thing and equals the key specified as client_type = 3. During login it only matters for Android, so only the value from client_type = 3 is relevant here.
- REVERSED_CLIENT_ID is a reversed version of the key specified as client_type = 2 - the proper reversed version is, of course, in GoogleService-Info.plist