I am using firebase auth for my web project. I use the code below to sign out but it keeps redirect me to homepage instead of index page.
function logout(){
firebase.auth().signOut().then(function() {
// Sign-out successful.
document.location.href = 'index.html';
}).catch(function(error) {
// An error happened.
});
}
I have tried this code but its not redirect to anywhere like the button is not function at all.
firebase.auth().signOut();
Aucun commentaire:
Enregistrer un commentaire