firebase login authentication problem
i am doing a web application..so for that i have used fire-base login authentication so its properly for creating an account and login and it redirects to some page as expected but the problem comes when we enter wrong credentials /empty then it also redirects to another page.without verifying whether the given details are correct or not i have tried .but nothing seem work ... `function validate(){ var email=document.getElementById("email"); var pass=document.getElementById("pass"); const promise=auth.createUserWithEmailAndPassword(email.value,pass.value); promise.catch(e => alert(e.message)); firebase.auth().onAuthStateChanged(user => { if(user){ window.location = "login.html"; } }); }` ...