title: Firebase authentication process
body: <p>I am having problems wrapping my head around the linking of firebase authentication providers.</p>
  
  <p>I have implemented email/password signup as well as Facebook authentication.</p>
  
  <p>Whenever I sign up and log in with Email/password it works 100%. But when I try to log in with Facebook after I have signed up with Email/password I get the message "The email address is already in use by another account."</p>
  
  <p>I am trying to link the facebook account in the following method right after I sign in using email and password.</p>
  
  <pre><code>FIRAuth.auth()?.signIn(withEmail: email, password: password) { (user, error) in
          if error != nil{
            print(error.localizedDescription)
          }
          else{
              let credential = FIRFacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
              user.link(with: credential) { (user, error) in
              if error != nil{
                  print(error.localizedDescription)
              }
              else{
                  print("SUCCESS")
              }
          }
      }
  </code></pre>
  
  <p>When getting to the "let credential" line it throws an error of undefined.</p>
  
  <p>One more question. When I log in with Facebook, log out again resetting password using Firebase's password reset and trying to log in with email and password should the app still be able to log in with Facebook auth? I tried it before and it didn't log in with Facebook anymore but it logged in with email and password.</p>