title: Sign in with Facebook if account already linked with google during initial signup in Firebase Android
body: <p>I am trying to sign in with facebook in the reinstallation of an android app. Initially I signed up using Google and successfully linked it with firebase.</p>
  
  <p>But when I try to do with facebook it gives a </p>
  
  <pre><code>FirebaseAuthUserCollisionException
  </code></pre>
  
  <p>I read in the <a href="https://firebase.google.com/docs/auth/android/account-linking" rel="noreferrer">Firebase Documentation</a> that you can do so by</p>
  
  <pre><code>FirebaseUser prevUser = currentUser;
  currentUser = auth.signInWithCredential(credential).await().getUser();
  // Merge prevUser and currentUser accounts and data
  // ...
  </code></pre>
  
  <p>but here <code>await()</code> method no longer exists. Also after searching a bit I found out this solution </p>
  
  <pre><code>Tasks.await(mAuth.signInWithCredential(credential)).getUser();
  </code></pre>
  
  <p>But this also gives an error when getting the current user which is already linked. What can I do to solve this?</p>