As of version ^3.0.0, I\'m having a difficult time removing the auth state change listener.
To start the listener per the documentation:
firebase.a
According to the documentation, the onAuthStateChanged() function returns
onAuthStateChanged()
The unsubscribe function for the observer.
So you can just:
var unsubscribe = firebase.auth().onAuthStateChanged(function (user) { // handle it });
And then:
unsubscribe();