9

I am using this plugin.

https://github.com/EddyVerbruggen/cordova-plugin-googleplus

The implementation works fine for android. But google sign in on iOS opens safari webview and throws 400 invalid_request.

I am using the ios client id and reverse client id generated on google developer console.

Anyways to debug or know what the issue is?

SpiritOfDragon
  • 1,209
  • 2
  • 12
  • 25

1 Answers1

2

The usual cause of this error is having an incorrect REVERSE_CLIENT_ID. Double check that you have the REVERSE_CLIENT_ID from the plist file downloaded when you set up the iOS application registration on the Google developer console. Note that if you got it wrong, changing this is difficult, as it gets copied into various locations and won't update automatically if you just try to change it in config.xml. When I mistakenly used my Android client ID to set up the plugin, I found that as well as config.xml I also needed to change the top level package.json file, and the <appname>-Info.plist in the platforms/ios directory in order to get the correct ID used.

Jules
  • 13,417
  • 7
  • 75
  • 117
  • 3
    Whenever you need to change the REVERSED_CLIENT_ID, you need to remove the plugin first and then add it again with the new REVERSED_CLIENT_ID, e.g: `ionic cordova plugin rm cordova-plugin-googleplus` then followed by `ionic cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=new_reversed_client_id` – Charlie Ang Oct 06 '17 at 10:29
  • Solution has been discuss in this thread: https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/309 – Snow Bases Sep 24 '19 at 06:24