firebase / firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
https://firebase.google.com/
Apache License 2.0
4.58k stars 1.06k forks source link

Sign in first with e-mail/password, then with Microsoft fails silently #956

Open rbubley opened 2 years ago

rbubley commented 2 years ago

[REQUIRED] Describe your environment

[REQUIRED] Describe the problem

Steps to reproduce:

  1. Log in as a new user using email and password.
  2. Log out
  3. Log in using same e-mail with a Microsoft account.

Page returned says "FirebaseUI Demo You are signed out." - No error messages, no hint what the problem is.

Expected behaviour: Window saying "You already have an account", with a button to take you to the correct provider.

(And a further, presumably related issue:

  1. Go back to sign in, and select sign in with google.

Result: firebaseui rectangle appears, with the blue animated loading bar at the top, and just stays there - endlessly waiting for something. )

This issue might be related to #954

Jerit3787 commented 2 years ago

Is this have any response from the team? I recently switched to v9 and this broke as well. For me, it was reporting (auth/account-exists-with-different-credential). Wasn't firebase-ui should handle properly linking accounts? In v8 still works but broken in v9. Used latest version of firebase and firebase-ui. In the demo it show nothing at all.

jekh commented 2 years ago

I just came looking for a solution to this as well. I've also tried logging in with a Microsoft account with the same email as an account registered using the Google provider (rather than email) -- the same thing occurs. Neither of the success or failure callbacks are triggered -- signInSuccessWithAuthResult and signInFailure. It just fails silently.

It does seem like firebaseui should either prompt linking the Microsoft account to the existing credential, or suggest logging in with the other provider instead (similar to when you attempt to sign in with email for an OAuth-linked account).

Jerit3787 commented 2 years ago

Yeah, I do wish it had a fallback. But so far I’ve tested if an account is registered first with an microsoft account, then tries to registers with an email and password. The menu works out of the box. I guess there’s issue behind this when using microsoft as a secondary auth provider for an account.

cgil commented 2 years ago

Is there any solution to merging accounts across providers?

dcoleyoung commented 1 year ago

The correct behavior exists for the email/password, e.g. Account exists use google for example. Complete hang on FB login.

camnewnham commented 1 year ago

This still occurs with

    "firebase": "^9.18.0",
    "firebaseui": "^6.0.2",

Login with Google OK Login with email/pass OK (redirects to login with Google) Login with Microsoft silently fails

It creates a firebaseui:pendingEmailCredential in session storage but then nothing.

killianhuyghe commented 1 year ago

I "fixed" this by reverting to firebase v8.10.1 and firebaseui v5.0.0 as suggested in this issue.

As I am using firebase v9 for almost everything else in my app, my workaround implies dynamically loading firebase v8 only when I need to show the sign in view (so that I don't pay the cost of double loading firebase every time).

Note that the thread also contains another workaround that should be compatible with firebase v9 (didn't test), but it seems quite hackish.

michjun commented 12 months ago

seems like this is still broken as of today. Please at least fire signInFailure callback so that we can do someworkarounds