【发布时间】:2021-04-20 18:35:12
【问题描述】:
每当我尝试通过调用 createUserWithEmailAndPassword 方法从 UI 注册新用户时,它都会返回“E {code:”auth/user-not-found”,消息:“没有与此标识符对应的用户记录。用户可能已被删除。", a: null}"。 不确定它是尝试登录还是存在其他问题。
这是我在 UI 上提交按钮的代码:
submit = () => {
const un = document.getElementById('email-input').value;
const pw = document.getElementById('password-input').value;
if (this.pageType === 'login') {
firebase.auth().signInWithEmailAndPassword(un, pw).then(res => {
window.location.href = 'loggedin.html';
console.log(res);
})
} else if (this.pageType === 'signup'){
firebase.auth().createUserWithEmailAndPassword(un, pw).then(un, pw => {
console.log(res);
})
}
有人有线索吗?
谢谢!
【问题讨论】:
标签: javascript firebase firebase-authentication