- 1

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"; } }); }` ...

1st May 2021, 5:09 PM
Sai Dinesh
Sai Dinesh - avatar
1 Réponse
0
did u understand problem that i have said that there is a problem on frebase.auth().onAuthStateChanged(user => { if(user){ window.location = "login.html"; } }); this can u know how to solve
1st May 2021, 5:46 PM
Sai Dinesh
Sai Dinesh - avatar
Aujourd'hui en vedette
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
help
0 Votes
AI
2 Votes
APIs
1 Votes