title: Getting different tokens in JavaScript
body: <p>I am currently using React and using firebase authentication.
  I noticed I get different token results by doing this</p>
  <pre><code>app.auth().currentUser.getIdToken(true).then( (token) =&gt; {
              console.log(token);
          });
  </code></pre>
  <p>and</p>
  <pre><code> app.auth().onAuthStateChanged(function(user) {
              if (user) {
                user.getIdToken().then(function(token) {
                    console.log(token);
                });
              }
          });
  </code></pre>
  <p>I'm not too sure which token is the current one for storing it into my cookies. Any Idea what the difference is?</p>