firebaseui-web icon indicating copy to clipboard operation
firebaseui-web copied to clipboard

Issues handling merge conflicts when upgrading anonymous users with V9 compat

Open mkomaiha opened this issue 2 years ago • 3 comments

  • Operating System version: macOS Monterey 12.2.1
  • Browser version: Chrome Version 98.0.4758.109
  • Firebase UI version: 6.0.1
  • Firebase SDK version: 9.6.7 (Compatibilty Mode)
  • React Firebase UI version: 6.0.0

This is in regards to handling anonymous-upgrade-merge-conflict. Before updating to 6, I was on firebaseui 5.0 and firebase 8.x. Merge conflicts in the signInFailure would return the error.credentials

signInFailure: (error) => {
    // For merge conflicts, the error.code will be
    // 'firebaseui/anonymous-upgrade-merge-conflict'.
    if (
      error.code != "firebaseui/anonymous-upgrade-merge-conflict"
    ) {
      return Promise.resolve();
    }
    console.log(error.credential) // null
    // ... merge logic
}

I looked through some of the code and this seems to be an issue with firebaseui.js. The object no longer contains a credentials value as shown below image

Instead there is a customData key with the _tokenResponse that contains the IdToken image

mkomaiha avatar Mar 05 '22 00:03 mkomaiha

  • Operating System version: Linux opensuse
  • Browser version: Chromium 101.0.4951.54 (openSUSE Build) stable (64-bit)
  • Firebase UI version: 6.0.1
  • Firebase SDK version: 9.8.1 (Compatibilty Mode)

I'm facing the same problem. error.credential == null when using Google login/auth-provider, works as expected with email login/auth-provider. I also suspect the error is related to the compat libraries.

volkerp avatar May 11 '22 21:05 volkerp

Hitting this issue too. Did you find any any workaround @volkerp ?

bhr avatar Aug 05 '22 22:08 bhr

Hitting this issue too. Did you find any any workaround @volkerp ?

Unfortunately no. My hunch is that the compat mode is not as compatible as it claims to be. At this time I'm wondering if the whole project is still active.

volkerp avatar Oct 26 '22 12:10 volkerp