cordova-plugin-googleplus
cordova-plugin-googleplus copied to clipboard
Consent screen multiple times
I manage to make it work, but the popup ask multiple times for consent. It ask me for my account, then it close, then ask for consent, then it close, then ask for consent again, then it close and finish.
this.googlePlus.login(
{
'webClientId': [My web client id],
'offline': true
}
)
cordova 9.0.0 ([email protected]) cordova-android 8.1.0 ionic-native/google-plus: 5.9.0
Same issue for me, i also found this stackoverflow thread : https://stackoverflow.com/questions/59908286/why-confirm-your-choices-pops-up-twice-using-cordova-google-plus-plugin/60134209#60134209.
On iOS it is working properly.
Have the same issue. Thanks for reporting.
Now we have same issue, but this was working perfect some weeks ago.
As a clue to say that this has begun to happen suddenly without any apparent change and only in Android.
Any news about this?
Waiting so far.
Same issue here.
"dependencies": { "@angular/common": "^7.2.2", "@angular/core": "^7.2.2", "@angular/fire": "^5.3.0", "@angular/forms": "^7.2.2", "@angular/http": "^7.2.2", "@angular/platform-browser": "^7.2.2", "@angular/platform-browser-dynamic": "^7.2.2", "@angular/router": "^7.2.2", "@ionic-native/core": "^5.0.0", "@ionic-native/google-plus": "^5.19.1", "cordova-android": "8.1.0", "cordova-ios": "^5.1.1", "cordova-plugin-googleplus": "5.2.1", "cordova-support-android-plugin": "^1.0.1", "cordova-support-google-services": "^1.3.2", "core-js": "^2.5.4", },
Same issue
try to pass 'offline': false
Passing offline false doesn't solve the issue. The issue still exist. I need to go offlline true so i can request the serverAuth.
Nothing changed for me by setting offline mode to false. The consent pop-up still show twice.
Same issue here. The consent pop-up still show twice.
The Android Google Client API used in this plugin has been deprecated. I've started to rewrite the Android version to use the newer API.
https://android-developers.googleblog.com/2017/11/moving-past-googleapiclient_21.html
I have it no longer double prompting but I haven't tested it well enough to warrant a pull request.
Edit: Here is my fork/branch https://github.com/joseph-montanez/cordova-plugin-googleplus/tree/android-google-api
@joseph-montanez Would you please make a Pull Request. Thanks.
Edit: Ah, I see. I'll test your fork later.
It does not happen on all the versions of Android though, on Android 5 and 6 it works correctly. From 8+ there is an issue. I do not have an Android 7 device anymore to test
Try googleplus.login({ offline : false, webclientid: '... ' })
Same problem here, the consent screen is shown infinitely even selecting “allow”. The app was working in prod without issues since two years and suddenly stopped working without any change on the code related with the login.
offline: false solves the issue but is not an option because the serverAuthCode is not returned anymore.
Inspected the logcat but there are nothing meaningful.
Any clue on what can be the error?
Finally found the issue for our use car (ionic v3), it is related with the @ionic-native/google-plus wrapper of the plugin... What we did to get it back working:
- Remove the wrapper: npm uninstall --save @ionic-native/google-plus
- Remove all imports you may have and corresponding referencing: import { GooglePlus } from '@ionic-native/google-plus';
- add directly the plugin calls via the windows var: declare var window: any; ... return window.plugins.googleplus.trySilentLogin({}, function(res) { ...
For the ones that used promises with the wrapper, be careful because the plugin uses callbacks. Note: we have updated to the last version of the plugin ->8.5.0