-
Notifications
You must be signed in to change notification settings - Fork 1.6k
FirebaseAuth should consider Facebook emails as verified. #5344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment has been minimized.
This comment has been minimized.
@bojeil-google what's the reason we don't do this? |
Hey @janniklind you have been spamming multiple Firebase repos with this issue. I have seen at least 10 posts from you on this same topic. |
Thanks @bojeil-google. Closing this since it's a duplicate. |
@bojeil-google Yes I have made comments on some of the many threads where people are facing this same issue (for years), but where you continue to close the issues without any explanation. The same way you close this issue as a duplicate, but not really mentioning that the others are already closed or could be considered as closed as well, because you clearly state everywhere that this is intended behaviour. I am questioning, why is this intended behaviour then? I mean your arguments about the Facebook email not being verified, is clearly not what Facebook states in their documentation. And even if Facebook guarantees that they verify the emails, you don't trust them because they are not the owner of the email domains. At the same time you consider the emails from Apple Sign In as verified, even though Apple neither owns the email domains. I just think the users of Firebase Auth with Facebook wants to know the technical or political reasons for why the emails are not being considered as verified. |
hi @janniklind I've the same problem, do you have resolve? |
Hey @janniklind, Megha (Firebase engineer) here - I understand your frustration - and hope I can help provide some more context. We consider the email verified if it's:
Let me provide some example scenarios to help highlight why the behavior you noted is WAI: Case 1: Annie creates a FirebaseAuth user, logging in for the first time using Google via an @gmail.com account (or other Google-managed domain). Facebook’s documentation notes that when linking accounts, the developer should ensure that the email address passed in for Facebook login is valid when linking accounts (“If you use an email address as the unique credential which identifies each account, your app should verify that the email address associated with the person's Facebook account (and obtained during Facebook Login) is valid. You can do this by creating code in your app to send a verification email to the address obtained after Facebook Login (you will probably need to have this step as part of your regular login system anyway”). Case 1a: Annie is attempting to login the second time via Facebook with her @gmail.com address. Here, we’d recommend ‘linking’ the two logins - FirebaseUI handles this for you (Firebase UI) or you can handle it manually via the core sdk, responding to the ‘ERROR_ACCOUNT_EXISTS_WITH_DIFFERENT_CREDENTIAL’ response. You mentioned that Case 1’s behavior was different than in the case of Sign in with Apple, but the situation is not actually the same: Case 2: Alice is logging in with Google (gmail) and then Sign in with Apple (using her Apple ID, which happens to be her @gmail.com address). A. As Apple is an IDP (not a social login), it provides additional guarantees around all emails being properly verified (Sign In With Apple), and so is a verified provider. B. In the case of Sign in with Apple, Alice is providing an Apple ID - Apple allows users to hide their email address from you (via a privaterelay.appleid.com email address that will forward to the user’s real email address). Both Alice’s logins are via verified providers (gmail with Google, Apple ID with Apple), and we’ll automatically link these two accounts, if Annie elects to share her real @gmail.com email address instead of her relay address. If she uses a relay address, she will have created a new Firebase Auth User or link that relay to her Google-based Firebase Auth User. As Apple is a fully-fledged iDP, it provides the necessary guarantees around email verification (https://developer.apple.com/sign-in-with-apple/) - in order for the Apple ID login and the Google login to be successful, the user must be Alice (who has access to both her @gmail.com account and her Apple ID credentials). In summary:
|
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Firebase auth is not following Facebook's guidelines regarding Facebook sign in and merging of accounts: https://developers.facebook.com/docs/facebook-login/multiple-providers#associating2
How to reproduce:
Expected behaviour: Given the Facebook user has an email associated with his Facebook account, the sign in should complete without any additional prompts.
As stated in the Guidelines from Facebook: https://developers.facebook.com/docs/facebook-login/multiple-providers#associating2
Current behaviour: Firebase auth throws an error "ERROR_ACCOUNT_EXISTS_WITH_DIFFERENT_CREDENTIAL", and then we need to fetch providers for the existing user using fetchSignInMethodsForEmail, then the user should sign in using Google, and only after that we can link the accounts and the user can from now on use Facebook without this annoying prompt.
Additional information:
If you run the scenario using Apple Sign In instead of Facebook sign in, it works perfectly, because somehow Google trust the email is verified by Apple, but Google don't trust Facebook.
Please fix this issue, it has been hanging for years and both developers and users is really annoyed by it. - and I think more developers tend to not using Firebase Authentication before of this thing.
If Google don't want to take the responsibility of trusting Facebook, then let it be up to the developer to decide that by flipping a flag in the Firebase Console.
The text was updated successfully, but these errors were encountered: