When a user first logs in through Facebook on Firebase Auth, duplicate users with unique UID's are created.
The peculiar issue is that I implemented login for this app months ago. An unrelated problem caused me to change my Firebase app. Since then new logins create duplicates. This is very hard for me to solve as the code I have implemented for login uses Facebook SDK and theres not much revealing whats under the hood. Also Firebase has an option that prevents users from creating duplicate accounts with the same email from different providers. But as you can see I am getting an erroneous user upon that initial login. Has anyone ever seen this problem? How am I suppose to fix it, when the problem is arising using the Facebook SDK?
There were two calls to signInWithCredential. FYI, this does not result in problems when the user has already logged in. So it could be a silent error that creeped up on you if you have the same problem.