gpt4 book ai didi

reactjs - FirebaseUI react : allow user to sign up via email+password without providing their first/last name

转载 作者:行者123 更新时间:2023-12-04 04:12:16 25 4
gpt4 key购买 nike

我正在使用 FirebaseUI React 身份验证组件,因此用户可以通过电子邮件 + 密码登录。

const uiConfig = {
signInFlow: 'popup',
signInOptions: [
firebase.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD,
]
};

....

<FirebaseAuth uiConfig={uiConfig} firebaseAuth={firebase.auth()}/>

但是,注册表单需要用户的名字和姓氏。

Screenshot of the FirebaseUI email+password login

我不希望用户在注册时提供这些信息。如何自定义组件以从注册流程中删除名称输入?

最佳答案

setRequireName method似乎允许这样做。这是 FirebaseUI 演示应用程序的示例 using setRequireName to enable/disable this UI element :

if (mUseEmailProvider.isChecked()) {
selectedProviders.add(new IdpConfig.EmailBuilder()
.setRequireName(mRequireName.isChecked())
.setAllowNewAccounts(mAllowNewEmailAccounts.isChecked())
.build());
}

关于reactjs - FirebaseUI react : allow user to sign up via email+password without providing their first/last name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61513969/

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