How to detect if a user has signed in to my app using Firebase with Facebook, email, or Google using Swift
<p>I want to detect if a user has signed in using Facebook or email, etc...</p>

<p>I found an answer for Android, but I am programming in Swift for iOS and I am not sure how to translate the code entirely.</p>

<p>The android/java code is : </p>

<pre><code>for (UserInfo user:FirebaseAuth.getInstance().getCurrentUser().getProviderData()) {
if (user.getProviderId().equals("facebook.com")) {
System.out.println("User is signed in with Facebook");
  }
}
</code></pre>

<p>I have tried to translate it, but I can't seem to figure out how to access the values. I keep getting a memory address instead.</p>

<p>Here is my swift code:</p>

<pre><code>let authenticatedWith = FIRAuth.auth()?.currentUser?.providerData
</code></pre>