title: How to get Firebase idToken from AuthResult?
body: <p>Firebase are providing AuthResult on the callback for user sign in using startActivityForSignInWithProvider (in my case the provider is apple on Android platform).
  I can't seem to fetch the idToken from it in a proper (synchronous) way.</p>
  
  <p>So far I found two options, both aren't satisfying:</p>
  
  <p>Option 1: casting</p>
  
  <pre><code>((OAuthCredential)authResult.getCredential()).getIdToken()
  </code></pre>
  
  <p>This works but I'm not sure if it's a safe cast. Plis, I'm thinking, if Firebase would have wanted us to fetch the idToken this way, they would have added it to AuthCredential.</p>
  
  <p>Option 2: fetching it from the user</p>
  
  <pre><code>authResult.getUser().getIdToken(false).addOnCompleteListener { ... }
  </code></pre>
  
  <p>This seems to be a safe solution, but it's an async method. It doesn't seem to make sense to performing another async method, after the user just manually signed in (this is what i'm doing for an existing user).</p>