cordova-plugin-googleplus icon indicating copy to clipboard operation
cordova-plugin-googleplus copied to clipboard

iOS issue with latest 8.4.0 version

Open vencis opened this issue 4 years ago • 10 comments

Hi, I'm using cordova 9 with ios platform 5.1.1 and latest 8.4.0 version of this plugin. I'm able to build and run my application but function login does not work. Success or Error callback function is not invoked, nothing happens.

window.plugins.googleplus.login(
    {
      'scopes': '... ', // optional, space-separated list of scopes, If not included or empty, defaults to `profile` and `email`.
      'webClientId': 'client id of the web app/server side', // optional clientId of your Web application from Credentials settings of your project - On Android, this MUST be included to get an idToken. On iOS, it is not required.
      'offline': true // optional, but requires the webClientId - if set to true the plugin will also return a serverAuthCode, which can be used to grant offline access to a non-Google server
    },
    function (obj) {
      alert(JSON.stringify(obj)); // do something useful instead of alerting
    },
    function (msg) {
      alert('error: ' + msg);
    }
);

Same code with version 8.2.1 works fine

vencis avatar Mar 13 '20 09:03 vencis

Hi, I have the same problem.

lrobak0 avatar Mar 17 '20 07:03 lrobak0

Same issue, on android is ok

Re4ctor avatar Mar 17 '20 16:03 Re4ctor

The same issue, guys.

Google changed something, who knows?

R1cro avatar Mar 25 '20 11:03 R1cro

same here!!

BrutussMaximus avatar Mar 27 '20 11:03 BrutussMaximus

no news?

BrutussMaximus avatar Apr 02 '20 09:04 BrutussMaximus

Ok i got it!!!

async doGoogleLogin(){ let params; if (this.platform.is('android')) { params = { 'scope': '... ', 'webClientId': 'youridhere', 'offline': true } } else { params = {} } this.googlePlus.login(params) .then(user => {

On ios you have to pass the params as empty.

Re4ctor avatar Apr 02 '20 10:04 Re4ctor

Ok i got it!!!

async doGoogleLogin(){ let params; if (this.platform.is('android')) { params = { 'scope': '... ', 'webClientId': 'youridhere', 'offline': true } } else { params = {} } this.googlePlus.login(params) .then(user => {

On ios you have to pass the params as empty.

GREAT!!!!

BrutussMaximus avatar Apr 02 '20 11:04 BrutussMaximus

Man, you dont know the struggle to find that out, i was just trying random stuff untill i got it.

@EddyVerbruggen please specify in the documentation this beahvior, because a lot of people are strungling with it and is not that clear.

Re4ctor avatar Apr 02 '20 11:04 Re4ctor

@Re4ctor, @BrutussMaximus could you kindly share you iOS platform, ionic and cordova versions, please?

@Re4ctor fix didn't resolve the app crash issue. Maybe I need to update.

R1cro avatar Apr 13 '20 14:04 R1cro

@R1cro android 8.1.0 ios 5.1.1

Re4ctor avatar Apr 14 '20 13:04 Re4ctor