Firebase Google Auth自动选择用户.如何强迫它选择帐户 [英] Firebase google auth automatically selecting user. How to force it to select account

查看:157
本文介绍了Firebase Google Auth自动选择用户.如何强迫它选择帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在任何浏览器中,当我使用单个Google帐户登录并尝试在firebase上调用使用google登录"选项时,它将自动使用已登录的帐户登录到firebase.它使我无法选择使用其他帐户登录. 仅当一个帐户登录浏览器时,才会发生这种情况.多个帐户不会造成此问题. 因此,这是我可以强迫用户每次单击使用Google登录"按钮时选择帐户的任何方法吗?

If in any browser, when i am logged in with single google account and try to invoke 'sign in with google' option on firebase, it is automatically logging-in to firebase with the already logged in account. It gives me no option to login with a different account. This happens only if one account is logged in browser. Multiple accounts doesn't create this problem. So, it is any way I can force users to choose accounts everytime they click 'sign in with google' button?

推荐答案

这对我有用: https://groups.google.com/forum/#!topic/firebase-talk/gxBm0WKCuIY

var provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({
  prompt: 'select_account'
});

这篇关于Firebase Google Auth自动选择用户.如何强迫它选择帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆