1
ionic cordova plugin add cordova-plugin-googleplus
npm install @ionic-native/google-plus

This plugin I used and everything works file login and logout in normal scenario but when I do login with google then close the app then logout gives an error

Please use login or trySilentLogin before logging out

and because of the above error ( i guess ) when I do login with google again then no popup comes as it was not logged out properly.

I cleared cookie too from here. But it didn't work.

login(){
     this.googlePlus.login({})
      .then(res => console.log(res))
      .catch(err => console.error(err));
    }

    logout(){
    this.googlePlus.logout({})
      .then(res => console.log(res))
      .catch(err => console.error(err));
    }
cakePHP
  • 425
  • 1
  • 4
  • 23
  • I'm facing the same issue. Did you found any solution? – Mayank Kataria Mar 28 '21 at 07:49
  • 3
    You need to handle catch block for this.googlePlus.logout({}) then there you do trySilentLogin then inside that logout function again read this https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/300 – cakePHP Apr 01 '21 at 04:41

0 Answers0