Indo Entertain Indo Entertain - 2 months ago 11
Javascript Question

back to login page firebaseUI after sign out?

I just finish create sign out button using FirebaseUI, but if I click sign out button, I still on my page, not back to my login page. The idea is, if I click sign out button, user will sign out and back into login page. How I can make it ?

<!DOCTYPE html>
<script src=""></script>
<link rel="stylesheet" href="" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<h1>You Done</h1>
<h3 id="myemail"></h3>
<button type="button" id="btnout" class="btn btn-action hide">Sign out</button>
const btnout = document.getElementById('btnout');
const superemail = document.getElementById('myemail');
const config = {
apiKey: "AIzaSyBIi34ndZxxLq2l1gtpzFnAjohPU18pyCk",
authDomain: "",
databaseURL: "",
projectId: "skripsi-adeguntoro",
storageBucket: "",
messagingSenderId: "181721142188"
firebase.auth().onAuthStateChanged (firebaseUser =>{
superemail.innerHTML =;
console.log('not login');
btnout.addEventListener('click', e => {

Answer Source

you can use

window.location = "";
window.location.href = "";

try this. it will help you