Firebase for webを使用していて、ユーザーをメールとパスワードで登録しようとしています。ドキュメントに記載されているすべてのことを実行しましたが、何らかの理由で機能していません。
これは私の送信機能です:
function submitForm(){
var email = document.getElementById("email").value;
var password = document.getElementById("password").value;
console.log(email, password);
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
alert("oof not valid info brochocho");
});
window.location = 'index.html';
alert("registered");
};
`window.location = 'index.html';
サインアップが完了する前に、別のページにリダイレクトしています。この行を、によって返されるpromiseのthenブロックに配置する必要がありcreateUserWithEmailAndPassword
ます。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加