title: onAuthStateChanged return unsubscribe, I want to return currentUser
body: <p>I am in an Angular project (6.0) using firebase (5.2). I am using the function:</p>
  
  <pre><code>firebase.auth().onAuthStateChanged
  </code></pre>
  
  <p>this function returns a firebase.Unsubscribe, which I don't master. I just know to work with Observables, Subjects and Promises.</p>
  
  <p>I would like to use this function as a observable, like, I subscribe to it whenever I get the currentUser back.</p>
  
  <p>So far, I've tried to wrap it a observable:</p>
  
  <p>auth.service.ts</p>
  
  <pre><code>  loadUser() {
      return Observable.create((observer: Observer&lt;any&gt;) =&gt; {
        firebase.auth().onAuthStateChanged(
          currentUser =&gt; { return currentUser }
        )
      })
    }
  </code></pre>
  
  <p>and I subscribe whenever I start my angular application:</p>
  
  <p>in ngOnInit:</p>
  
  <pre><code>this.authService.loadUser()
    .subscribe(
      response =&gt; {
        console.log("response");
        console.log(response);
      },
      error =&gt; {
        console.log("error");
        console.log(error);
      }
    )
  </code></pre>
  
  <p>But the subscription is never triggered. I am not wrapping right the function of Firebase.
  1. I don't really understand why they return a firebase.unsubscribe.
  2. How can I solve the challenge?</p>
  
  <p>Thanks</p>