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

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

问题描述

如果在任何浏览器中,当我使用单个 google 帐户登录并尝试在 firebase 上调用使用 google 登录"选项时,它会自动使用已登录的帐户登录到 firebase.它让我无法选择使用其他帐户登录.仅当一个帐户登录浏览器时才会发生这种情况.多个帐户不会产生此问题.那么,有什么办法可以强制用户在每次点击使用谷歌登录"按钮时选择帐户?

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天全站免登陆