title: React Native - Firebase auth persistence not working
body: <p>Firebase auth does not persist logged in user and everytime I refresh or reopen app I have to sign in again.</p>
  
  <p>I have tried setting persistence to local and the callback does verify its set but the persistence is still no working</p>
  
  <p>For setting persistence I am using...</p>
  
  <pre><code>  //set auth persistence
    firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL)
      .then(function() {
        console.log("successfully set the persistence");
  
      })
      .catch(function(error){
      console.log("failed to ser persistence: " + error.message)
    });
  </code></pre>
  
  <p>.
  .
  .
  For signing in I am using this code</p>
  
  <pre><code>firebase.auth().signInWithEmailAndPassword(email, password)
        .then((user) =&gt;{
          this.checkAccountStatus(user.uid, user.email);
        })
        .catch(function(error) {
        // Handle Errors here.
  
        var errorCode = error.code;
        var errorMessage = error.message;
  
        console.log(errorMessage)
        // ...
      });
  </code></pre>
  
  <p>And here is the code I am using to check login status...</p>
  
  <pre><code>if (firebase.auth().currentUser) {
          const currentUser = firebase.auth().currentUser;
          console.log("Signed in username" + currentUser.displayName);
  
          this.props.navigation.navigate('AppTab');
        }else{
          console.log("no user signed in");
          this.props.navigation.navigate('AuthTab');
        }
  </code></pre>
  
  <p>if there anything I am not doing right</p>