title: How to link Multiple Auth Providers to an Firebase Account on Android?
body: <p>I referenced the <a href="https://firebase.google.com/docs/auth/android/account-linking" rel="nofollow">documentation in Firebase</a> page. My problem is in this paragraph:</p>
  
  <blockquote>
    <p>The call to linkWithCredential will fail if the credentials are already linked to another user account. In this situation, you must handle merging the accounts and associated data as appropriate for your app:</p>
    
    <p><code>FirebaseUser prevUser = currentUser; currentUser = auth.signInWithCredential(credential).await().getUser(); // Merge
        prevUser and currentUser accounts and data // ...</code></p>
  </blockquote>
  
  <p>I can't figure out how to add this code into my project. When and where do I put this code</p>
  
  <pre><code>auth.signInWithCredential(credential).await().getUser(); 
  </code></pre>
  
  <p>into my java file? Android Studio announced me that it can't resolve <code>await()</code> method.</p>
  
  <p>What should I do to resolve that problem. Thank you in advance!</p>