title: Firebase auth/user-token-expired: Where is it the error being thrown? (JS)
body: <p><em><strong>Background</strong></em>:<br>
  We are manually revoking our firebase refresh tokens via the firebase admin SDK in our backend. In our angular app we are using using the onAuthStateChanged method of firebase.auth() to determine whether a user authenticated. With the result of the onAuthStateChanged we use the method .getIdTokenResult() in order to get some metadata about the user and store it locally.</p>
  <p><strong>The problem</strong>:<br>
  After revoking the refresh token of a user from our backend, we wait for the ID token of the client to expire (an hour). Near the expiration time we notice an uncaught error being thrown in the client console log. We understand it's normal, as we just revoked the refresh token, and it was due to to refresh. The problem is we are unable to figure out <em>where</em> to catch this exception and where it is being thrown. We have placed .catches() , try/catches and provided error callbacks around all the suspected calls (onAuthStateChanged, getIdTokenResult), but we still seem to get the exception.</p>
  <p>Is there an internal process that automatically attempts to refresh tokens? If so, how do we go about catching this error?</p>
  <p>We think it's internal because the stack trace is pretty tough to follow and leads us nowhere productive.</p>
  <p>The error details: <br></p>
  <pre><code>code: auth/user-token-expired
  message: The user's credential is no longer valid. The user must sign in again.
  </code></pre>
  <p>And here is the nonsensical stack trace
  <img src="https://i.stack.imgur.com/f8HM1.png" alt="here is the nonsensical stack trace" /></p>