firebaseui-web
firebaseui-web copied to clipboard
Firebase JS SDK v9 support
Now that the v9 SDK is in production, is there an ETA on supporting it?
This is holding up migration as the bundle size reduction is really attractive for us (and most others, I believe) So, not the compatibility thing, but proper v9 support is needed.
Thanks,
For the immediate future 0.600.0 firebaseui@next
which utilizes v9-compat is what is available https://github.com/firebase/firebaseui-web/pull/850
Proper tree-shaking support would require a considerable API / build-process change & while we are thinking about what that might look like, I wouldn't expect any headway to be made for a while.
Can you update the docs, at very least for firebaseui. It retarded how billion dollar company can't track their shit engineering on docs.
For the immediate future 0.600.0
firebaseui@next
which utilizes v9-compat is what is available #850Proper tree-shaking support would require a considerable API / build-process change & while we are thinking about what that might look like, I wouldn't expect any headway to be made for a while.
firebaseui@next does not seem to support SAML.
Getting the following error:
Uncaught TypeError: firebase_compat_app__WEBPACK_IMPORTED_MODULE_0__.default.auth.SAMLAuthProvider is not a constructor
Importing firebase as follows:
import 'firebase/compat/auth';
As a workaround, using JS SDK v8 should resolve this issue with SAML in the meantime
How do you install it?
As a workaround, using JS SDK v8 should resolve this issue with SAML in the meantime
JSD SDK v8 does not load in the browser when bundled using webpack if auth (8.10.0) and compatible messaging (0.8.0) is included. Hence, we are forced to use SDK v9.
Workaround option: I'm using Firebase 9 in several projects and didn't want to use the v9 compat library so I decided to dynamically import the Firebase 8 SDK via CDN for FirebaseUI just when visitors open my authentication modal. This will save you from bundler bugs. You can see the SvelteKit implementation at https://github.com/jacobbowdoin/sveltefirets/blob/main/src/lib/components/FirebaseUiAuth.svelte but there's nothing really about this implementation that requires Svelte and you could do this same thing quite easily in any framework. That repo is a work in progress of my base implementation which I hope to turn into an easily installable library for SvelteKit users. For a live example you can see it in action at https://livingdictionaries.app/ (click "Sign In") and view the code at https://github.com/livingtongues/living-dictionaries/blob/main/src/sveltefire/components/FirebaseUiAuth.svelte (this version has i18n baked in).
@jacobbowdoin why not dynamically import v9 compat instead? that way you're on a supported version of the SDK that is compatible with v9 modular?
Just adding a +1 to please add v9 support. In the meantime could you update the README to tell people to install a specific version? e.g. npm install --save [email protected]
hope there is v9 support soon. I spend 1 day convert my code to v9 but stuck in firebaseui
hope there is v9 support soon. I spend 1 day convert my code to v9 but stuck in firebaseui
There is support for v9 with compat library now, with FirebaseUI v6.0.0 and Firebase JS SDK v9.2.0 following this format link
If you are using v9 fully on your site (not the compat) then I suggest you MUST lazy load the firebaseui as it is extra bulky and essentially doubling up the firebase code. The compat packages are not going to save you much/any bundle size.
@ChromeQ do you have an example on how to lazy load firebaseui with plain javascript?
@jacobbowdoin why not dynamically import v9 compat instead? that way you're on a supported version of the SDK that is compatible with v9 modular?
Thanks for pointing out the obvious that I clearly missed, @jamesdaniels ! I've had a chance to further improve SvelteFire TS and now have Firebase 9.5.0 working smoothly with FirebaseUI 6.0.0 + v9 compat being pulled in via CDN only when needed (and I copied in the types as well). You can see it in action in 3 languages at https://sveltefirets.vercel.app/ (proper documentation is still needed but at least it's a useful playground!) Those working in Svelte can use SvelteFire TS and others can just learn from the implementation starting in https://github.com/jacobbowdoin/sveltefirets/blob/main/src/lib/client/components/FirebaseUiAuth.svelte
@ChromeQ do you have an example on how to lazy load firebaseui with plain javascript?
There's a bit more here than you're asking for @dalenguyen - but you could copy the ideas from my example as most of the functionality is not Svelte but is Javascript. Start here: https://github.com/jacobbowdoin/sveltefirets/blob/main/src/lib/client/components/FirebaseUiAuth.svelte#L30-L42 and https://github.com/jacobbowdoin/sveltefirets/blob/main/src/lib/client/loader.ts#L3-L8 then compare those with the basic javascript example given in this repo: https://github.com/firebase/firebaseui-web#starting-the-sign-in-flow
Be careful with the current v9 compat support. If you switch your app off of compat mode entirely it may break autoUpgradeAnonymousUsers because firebaseui relies on methods like linkWithRedirect that are not available on the native v9 Firebase User type.
To add onto Colin's message, linkWithPopup also is not available.
Hey folks, the compat layer should provide feature parity with the v8 library. Any issues you encounter, please report them to the firebase-js-sdk repo so they can be addressed.
Thanks, @jacobbowdoin. Updated the v9 compat to my WordPress website. Everything works fine 👍
@bojeil-google @jamesdaniels sorry for repeating the OP, but it seems like it wasn't answered and I would like to know too, is there any ETA on a firebaseui version that does not rely on the compatibility build? Thanks!
@bojeil-google @jamesdaniels , echoing @mikob , please give us guidance on this topic.
is there any updates? Is this issue dead?
Any news on this?
We are looking into this but no timeline to share ATM.
I noticed a new release of firebaseUI that's based on firebase 9.13 - does that mean support for 9 is finally here?
I noticed a new release of firebaseUI that's based on firebase 9.13 - does that mean support for 9 is finally here?
No. If you check the latest commits you'll see they just updated 9.1.3/firebase-app-compat.js
to 9.13.0/firebase-app-compat.js
Any timeline for this issue?
Related: https://github.com/firebase/firebaseui-web/issues/1015
Edit: I've been using Firebase directly for my projects as adding v9+ support no longer appears to be a priority for the maintainers.