Documents says that when the state changes, i.e. login/logout then this should trigger. I have the below code in the app.component.ts
firebase.auth().onAuthStateChanged((user: firebase.User) => {
console.log("user: ", user);
if (user && user.uid) {
this.rootPage = HomePage;
} else {
this.rootPage = LoginPage;
}
});
I should come back to the LoginPage after a successful login and then when I logout or even clear the browser history. But after clearing the browser history, my application still keeps sitting on the HomePage.