gpt4 book ai didi

firebase - 禁用AccountChooser进行Firebase身份验证

转载 作者:行者123 更新时间:2023-12-03 23:35:13 25 4
gpt4 key购买 nike

我正在尝试用于Web(https://github.com/firebase/FirebaseUI-Web)的新FirebaseUI。但是,当我尝试使用电子邮件登录时,它会将我重定向到AccountChooser网站。

无论如何,我可以关闭该AccountChooser吗?

谢谢

最佳答案

您可以通过在Firebase中的变量uiConfig中添加条目来禁用。您必须在uiConfig变量中添加它:

'credentialHelper': firebaseui.auth.CredentialHelper.NONE


这是 uiConfig中的示例:

var uiConfig = {
callbacks: {
signInSuccess: function (currentUser, credential, redirectUrl) {
return true;
},
uiShown: function () {
document.getElementById('loader').style.display = 'none';
}
},
//Start it here
credentialHelper: firebaseui.auth.CredentialHelper.NONE,
//End it here
signInFlow: 'popup',
signInSuccessUrl: '<url-to-redirect-to-on-success>',
signInOptions: [
// Leave the lines as is for the providers you want to offer your users.
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.FacebookAuthProvider.PROVIDER_ID,
firebase.auth.TwitterAuthProvider.PROVIDER_ID,
firebase.auth.EmailAuthProvider.PROVIDER_ID
],
// Terms of service url.
tosUrl: '<your-tos-url>'
};

var ui = new firebaseui.auth.AuthUI(firebase.auth());
ui.start('#firebaseui-auth-container', uiConfig);

关于firebase - 禁用AccountChooser进行Firebase身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37369929/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com