title: How to get the ID token from FirebaseAuth
body: <p>I am reading some Json files from my firebase database and I am trying to obtain an ID token for the current user to be used in the header as follows:</p>
  
  <pre><code> var response = await httpClient.get(url,headers: {'Authorization':"Bearer ${FirebaseAuth.instance.currentUser.getToken()}"});
  </code></pre>
  
  <p>when I do the previous line, it seems that it does not get the correct token as I can not access the database, however, when I manually include an ID token in the string, my application works as intended. What is it exactly that I am doing wrong ? </p>