Firebase same email different provider account merge problem

927 views
Skip to first unread message

Davinder Singh

unread,
May 23, 2020, 5:30:31 PM5/23/20
to Firebase Google Group
Hey,
I am using firebase in my android app that I am creating using unity engine, to sign in using google and Facebook.
Now what I actually wanted was that when a user has same email in both google and Facebook, then the user can log in using any one of both but the profile in my app or say user data will be the same because the email is the same. so literally I just want to merge the accounts of google and Facebook of the user.
Now when I sign in in my app using facebook first then I can see the user in my firebase with service provider Facebook, and after that when I sign in user with google then it works fine and lets me sign in but the provider in firebase is overridden; i actually want to merge them.
Secondly, if I first log in using google and then try to login using facebook, then i get an error saying that the same email with different credentials error. so i can't even sign in.

Can anyone, in the end, help me merge the two accounts in my app?

Thanks. :)

Sam Stern

unread,
May 27, 2020, 12:15:57 PM5/27/20
to Firebase Google Group
Hi Davinder,

I understand your confusion but this is actually working as intended.  I assume the user had an @gmail email address?  In that case we consider Google to be the verified source of truth and if a user has Google + {Some other provider} we will overwrite with the Google details.

You can manually add in parts of their Facebook profile using an update request after they sign in.

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/635de5a5-9187-40c8-800f-890db16c23d0%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages