FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Facebook auth fails if using the same email as an existing Google user

Open akifumi opened this issue 6 years ago • 10 comments

Login doesn't finish if using facebook auth with google auth. Loading indicator doesn't appear in authViewController.

akifumi avatar May 06 '19 22:05 akifumi

Can you share a project that reproduces this issue?

morganchen12 avatar May 07 '19 03:05 morganchen12

@morganchen12 Thank you for your reply. I created sample project. Please check this repository. If sign in with a facebook account with the same address as Gmail, login doesn't be completed. https://github.com/akifumi/FUISample675

akifumi avatar May 08 '19 23:05 akifumi

Hi @akifumi , I don't understand "using facebook auth with google auth". Could you please detail the steps to reproduce?

renkelvin avatar May 17 '19 00:05 renkelvin

Hi, I think I'm having the same problem. It doesn't happen always, for me it works, but every time my workmate tries to login with his account, the app gets stuck on the Auth Picker View Controller like in the image: screenshot He has the Facebook app installed, if it makes any difference. For me it works on my phone with or without FB app. Thanks for the help.

jmmartinezdev avatar May 31 '19 11:05 jmmartinezdev

@jmmartinezdev are there any errors in console when this happens?

morganchen12 avatar May 31 '19 19:05 morganchen12

@morganchen12 no I don't get anything on the console. It looks like a background operation is frozen, though the UI is still responsive and login can be cancelled.

jmmartinezdev avatar Jun 03 '19 06:06 jmmartinezdev

Can you reproduce this by installing the Facebook app on your phone (or fix the issue by uninstalling the Facebook app from your coworker's phone)?

morganchen12 avatar Jun 03 '19 16:06 morganchen12

This situation occurs if FUIEmailAuth is not added.

akifumi avatar Jun 23 '19 09:06 akifumi

Yup, including FUIEmailAuth resolved it for me.

alibad avatar Nov 13 '19 06:11 alibad

I'm having this same problem, 100% repeatable.

If I create an account with Google, I can't then sign in with Facebook using the same email address. And it's not specific to iOS either - I also can't do it in the web or Android version of FirebaseUI.

There are weird combinations, though. Like on the web, if I sign in with Apple and Google, then Facebook sometimes works to join the party.

And if I sign in with Facebook first, it always works.

Anyway, I'll keep this to iOS-specific for now. At first I was stuck with the spinner blocking the app entirely as described earlier in this thread. Then I added FUIEmailAuth as suggested, and now the spinner goes away, but instead I get a popup that says "This type of account isn't supported by this app", which makes little sense at all given that this type of account works fine in most cases.

So what's going on here?

Update: I found https://github.com/firebase/firebase-ios-sdk/issues/5344#issuecomment-618518918 which explains the issue. But I'm still left wondering why there isn't better user-facing error messaging built into Firebase UI when this issue arises. "This type of account isn't supported by this app" isn't useful for the developer or the user - why not just flow into the path that verifies the email and makes it possible to link Facebook to Google? (Or does that work if I implement the email/password flow?)

ubragg avatar Aug 20 '20 07:08 ubragg