title: Checking if user is still authenticated in angularfire2
body: <p>I have a working authentication using the angularfire2, I am just wondering if there is another way to check if the user is authenticated after the user recently logged in w/o hitting the server?
  The way I do this is like this</p>
  
  <pre><code>isAuthenticated():boolean{
   this.af.auth.subscribe(data =&gt; {
    if(data ){
    // User is authenticated
      return true;
    }
  });
  }
  </code></pre>
  
  <p>Any help is appreciated</p>
  
  <p>Edit 1:</p>
  
  <p>I decided to still use the original code to check if the user is recently logged in. What @cartant suggested is good enough when you are not checking the user at the start up of your application because it might return null as stated in the firebase official docs. The way I used it here is that I have menu items that should only be shown to authenticated users and using <code>firebase.auth().currentUser</code> will always return null on the initial load of the page.</p>