Open Aghamyr opened 5 years ago
It seems I finally found where the issue is coming from, I'll try my best to be clear : Apparently the idToken returned by googlePlus.login() method is differrent in the sense that both "azp" and "aud" values are the iOS client id in iOS case but in Android case the "azp" contains the Android client id and the "aud" the web client id. https://developers.google.com/identity/protocols/OpenIDConnect
So the problem appears on my API once I check the google client id it contains the iOS one instead of the web one and it fails the check. So I guess it's a google librairy problem on my API but I've got no idea why it's not working properly
I found out the answer
Apparently for iOS if you don't add the option 'offline' : 'true'
when calling the google login it doesn't use the webClientID you specified.
Not sure why it does that for iOS and not for Android though
It's in GooglePlus.m :
NSString* serverClientId = options[@"webClientID"];
...
if (serverClientId != nil && offline) {
signIn.serverClientID = serverClientId;
}
I'm still interested into why the different behavior for iOS and Android or if it's a bug, but hopefully this will help someone else someday
Hi, I have a weird issue with my Ionic application. Users cannot use google plus login on iOS version of the app but the Android version works just fine. It takes the user to the google account login/select page but after the login it returns to the app and generates an error on iOS.
I have looked around for similar problems but only found people with the reverse problem where iOS works but not Android and I'm at a loss here, so I though I'd try my chance here and ask for help.
So far I've tried a few of the different versions of the googleplus plugins but without success, I've double checked that the reversed key is correct too. I also don't get an error code from the connect attemps, the error is set as "undefined".
Here is the Ionic install :
And here are the plugins installed :
Thank you for any advices you may have