4

I'm validating the user's account if he is allowed to sign in. When he isn't allowed, he will be signed out with: gapi.auth2.getAuthInstance().signOut()

The problem is when he presses the sign in button again, the account chooser won't appear. It just uses the old cached account and he will be immediately signed out again.

How can I delete the cookies, in order to show the account chooser again?

Cir0X
  • 446
  • 4
  • 11
  • This question has been answered, [here](http://stackoverflow.com/questions/14384354/force-google-account-chooser) – Ecotiny Jan 29 '17 at 01:54
  • @Ecotiny I don't think it does, or at least, not completely. If you follow the suggestions in that answer, you might set (say) prompt=consent, and that will force the prompt to appear every time. But what you really want is only to force the prompt to appear next time if it turns out the user is not allowed, otherwise let them automatically authenticate. So a way to actually force logout would be needed. – Matt R Apr 03 '19 at 17:05

1 Answers1

1

Haven't confirmed yet, but you might want to revoke the access instead of signOut(). https://developers.google.com/identity/sign-in/web/disconnect

agektmr
  • 2,144
  • 15
  • 14