您好,我正在尝试从Firebase中的当前用户检索信息,但是我无法提取该信息,因为我不知道应该从哪里开始在我的注册页面中制作该信息
JS
const email = txtEmail.value;
const password = txtPassword.value;
const name = txtName.value;
const industry = txtIndustry.value;
const birthday = txtBirthday.value;
const auth = firebase.auth();
const promise = auth.createUserWithEmailAndPassword(email , password).then(function (user) {
return user.updateProfile({'displayName: name'});
})
.catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorEmailExists = document.querySelector('.error-message-email');
var errorPasswordWeak = document.querySelector('.error-message-password-weak');
if (errorCode == 'auth/weak-password') {
errorPasswordWeak.classList.remove('hide');
}
if (errorCode == 'auth/email-already-in-use') {
errorEmailExists.classList.remove('hide');
}
});
我试图在不参考实时数据库的情况下创建用户个人资料,我也想知道如何制作其他变量以及'email'和'photoURL'
谢谢