title: getIdToken() is not a function, even if It is used like a function in firebase document
body: <p>I am dealing with firebase auth now and I was following this Firebase document.</p>
  
  <p>Visit <a href="https://firebase.google.com/docs/auth/admin/manage-cookies#sign_in" rel="noreferrer">https://firebase.google.com/docs/auth/admin/manage-cookies#sign_in</a></p>
  
  <pre><code>// When the user signs in with email and password.
  firebase.auth().signInWithEmailAndPassword('user@example.com', 'password').then(user =&gt; {
    // Get the user's ID token as it is needed to exchange for a session cookie.
    return user.getIdToken().then(idToken = &gt; {
      // Session login endpoint is queried and the session cookie is set.
      // CSRF protection should be taken into account.
      // ...
      const csrfToken = getCookie('csrfToken')
      return postIdTokenToSessionLogin('/sessionLogin', idToken, csrfToken);
    });
  })
  </code></pre>
  
  <p>I expected that I could get a token by using that function. But It doesn't work because user in the code doesn't have getIdToken() function.</p>