title: React-native - Firebase onAuthStateChanged not working correctly
body: <p>I have not been able to persist a firebase session in my react-native application. This question is nearly identical to 
  <a href="https://stackoverflow.com/questions/46143273/react-native-firebase-auth-persistence-not-working">React Native - Firebase auth persistence not working</a>
  but the answer provided there has not worked for me. </p>
  
  <p>Currently I log in as shown below:</p>
  
  <pre><code>export const loginUser = ({ email, password }) =&gt; {
    return (dispatch) =&gt; {
      dispatch({ type: LOGIN_USER });
  
      firebase.auth().signInWithEmailAndPassword(email, password)
        .then(user =&gt; loginUserSuccess(dispatch, user))
        .catch(() =&gt; loginUserFailed(dispatch))
  
    };
  };
  </code></pre>
  
  <p>My session is created and I have access to the user object stored on firebase.</p>
  
  <p>When I Cmd+R or when I close the application and reopen it my session is gone. I have run the following in the componentWillMount() section of my app.js file:</p>
  
  <pre><code>firebase.auth().onAuthStateChanged((user) =&gt; {
    if (user) {
      console.log('user is logged');
    } else {
      console.log('not logged in')
    }
  });
  </code></pre>
  
  <p>Whenever I refresh the app or close it completely and reopen I get the 'not logged in' response.</p>
  
  <p>I have also tried querying:</p>
  
  <pre><code>firebase.auth().currentUser
  </code></pre>
  
  <p>but get the same issue where it returns null</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Is there a particular way to keep the session active that I am missing?</p>