Hey guys.
Got a double authentication problem.
I'm using Firebase Android.
When app starts I log anonymously with Firebase Auth, and save entry to Firebase Database with to /users/uid, with no data.
Then there is a button to login with Facebook. When user logs in I get his email, and update /users/uid node with `email: a@b.c`
Then user uninstalls the app, and re-installs it.
When he opes the app he is, again, logged in anonymously, with a different uid.
Then he logs in with the same Facebook account.
I assumed that FirebaseUser will have it's uid updated to the old one and I will have new user linked to that old user that was logged in with this Facebook account.
Looks like it's not the way it works, because when I check my Firebase Database I see 2 entries with different id's and same emails.
My question is:
Does Firebase Auth synchronize uid's for different users that log in with same Facebook account?
How can I make sure I don't have 2 id's for the same user?
Thanks