问题
I am using the FirebaseUI React auth component so users can log in via email + password.
const uiConfig = {
signInFlow: 'popup',
signInOptions: [
firebase.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD,
]
};
....
<FirebaseAuth uiConfig={uiConfig} firebaseAuth={firebase.auth()}/>
However, the registration form wants the user's first and last name.
I don't want the user to provide this information at the time of registration. How do I customize the component to remove the name input from the registration flow?
回答1:
The setRequireName method seems to allow for this. Here is an example of the FirebaseUI demo application using setRequireName to enable/disable this UI element:
if (mUseEmailProvider.isChecked()) {
selectedProviders.add(new IdpConfig.EmailBuilder()
.setRequireName(mRequireName.isChecked())
.setAllowNewAccounts(mAllowNewEmailAccounts.isChecked())
.build());
}
来源:https://stackoverflow.com/questions/61513969/firebaseui-react-allow-user-to-sign-up-via-emailpassword-without-providing-the