title: Ionic 3 - Firebase current user is null
body: <p>I am trying to get current user using <code>angularfire2</code>. In my <code>app.component.ts</code> file I have following code</p>
  
  <pre><code>constructor(private afAuth: AngularFireAuth, ) {
  
    this.afAuth.auth.onAuthStateChanged((user) =&gt; {
      if (!user) {
        console.log("not login");
      } else {
        console.log("login");
      }
    });
  
    this.initializeApp();
  }
  </code></pre>
  
  <p>Now in my home page file I am trying to get with below code</p>
  
  <p><strong>CommonProvide.ts</strong></p>
  
  <pre><code>constructor(private afAuth: AngularFireAuth) {
  }
  
  getUid() {
     return this.afAuth.auth.currentUser.uid;
  }
  </code></pre>
  
  <p><strong>home.ts</strong></p>
  
  <pre><code>constructor(private cp: CommonProvider) {
     console.log(cp.getUid())
  }
  </code></pre>
  
  <p>Now this returns undefined uid. Then I noticed that an ajax call goes that fetch user data from firebase. That's why my constructor got fired first before ajax end. If I run my home constructor after some delay I got response. Now how will I get usr id? </p>