Google Auth 不允许在注销后选择帐户

Google Auth does not allow account selection after signing out

我使用以下方式让 Google 用户验证我的应用程序以访问他们的日历和基本配置文件:

gapi.auth2.getAuthInstance().signIn({scope: 'profile https://www.googleapis.com/auth/calendar.readonly'});

有问题的 AuthInstance 在 bootstrap:

是这样启动的
var googleAuth = gapi.auth2.init({
    'client_id': 'XXX',
    'immediate': false,
    'cookie_policy': 'single_host_origin',
    'scope': 'https://www.googleapis.com/auth/calendar.readonly'
});

以上工作正常 - 用户收到 windows 提示她 select 并登录到她的一个 Google 帐户,然后可以进行经过身份验证的请求.

但是,如果用户注销,则使用以下内容:

gapi.auth2.getAuthInstance().signOut();

然后尝试再次登录,window 将自动打开、关闭并使用她之前登录的同一帐户自动登录。即使刷新页面,这个问题仍然存在,唯一的解决办法是清除 cookie。

我如何确保注销用户允许她再次select她下次使用哪个帐户登录?

事实证明,要完成这项工作,您需要使用以下方法完全撤销访问令牌:

gapi.auth2.getAuthInstance().disconnect()