Javascript 注销后是否返回firebaseUI登录页面?

Javascript 注销后是否返回firebaseUI登录页面?,javascript,jquery,firebase,firebase-authentication,url-redirection,Javascript,Jquery,Firebase,Firebase Authentication,Url Redirection,我刚刚使用FirebaseUI完成了“注销”按钮的创建,但如果单击“注销”按钮,我仍然会在页面上,而不会返回到登录页面。这个想法是,如果我单击“注销”按钮,用户将注销并返回登录页面。我怎样才能做到 完成了吗 退出 const btnout=document.getElementById('btnout'); const superemail=document.getElementById('myemail'); 常量配置={ apiKey:“AIzaSyBIi34ndZxxLq2l1gtpz

我刚刚使用FirebaseUI完成了“注销”按钮的创建,但如果单击“注销”按钮,我仍然会在页面上,而不会返回到登录页面。这个想法是,如果我单击“注销”按钮,用户将注销并返回登录页面。我怎样才能做到


完成了吗
退出
const btnout=document.getElementById('btnout');
const superemail=document.getElementById('myemail');
常量配置={
apiKey:“AIzaSyBIi34ndZxxLq2l1gtpzFnAjohPU18pyCk”,
authDomain:“skripsi adeguntoro.firebaseapp.com”,
数据库URL:“https://skripsi-adeguntoro.firebaseio.com",
projectId:“skripsi adeguntoro”,
storageBucket:“skripsi adeguntoro.appspot.com”,
messagingSenderId:“181721142188”
};
firebase.initializeApp(配置);
firebase.auth().onAuthStateChanged(firebaseUser=>{
if(firebaseUser){
btnout.classList.remove('hide');
console.log(firebaseUser);
superemail.innerHTML=firebaseUser.email;
}否则{
log('notlogin');
btnout.classList.add('hide');
}
});
btnout.addEventListener('click',e=>{
firebase.auth().signOut();
});
您可以使用

window.location = "http://my.url.here";
window.location.href = "http://my.url.here";
试试这个。它会帮助你的