Auth Persistence in browser using Ionic4 and Firebase

I’m trying to set persistence authentication to my ionic 4 web project.

I’ tried firebase and angularfire2 methods and my local storage is enabled.

firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL);

angularFireAuth.authState.subscribe((user)=>{
  console.log(user);      
});


firebase.auth().onAuthStateChanged((user) => {
  if (user) {
    console.log(user);        
  } else {
    console.log("nop");        
  }
});

Both methods return NULL when the page is refreshed, and then the user is redirected to the login page. I would like to implement a way the user stays logged in.

tested in chrome.