i have the same setup and it works fine.

i have my auth state change listener at the top of my router...

state = { user: null };

componentdidmount() {
   firebase.auth().onauthstatechanged(user => {
      if (user) {
        this.setstate({ user });
      } else {

in login.js i have a form that connects to a login function similar to yours...

login() {
      .signinwithemailandpassword(, this.state.password)
      .then(res => {
      .catch(err => console.error(error));

the only thing that i can think of you gave history.replace, try changing to history.push.

if that doesn't work is there any chance you can set up a with a mcve and i'd be happy to debug it

Related Query

More Query from same tag