-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Firebase JS SDK v9 support #877
Comments
For the immediate future 0.600.0 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. |
This comment has been minimized.
This comment has been minimized.
firebaseui@next does not seem to support SAML. Getting the following error: Importing firebase as follows: |
As a workaround, using JS SDK v8 should resolve this issue with SAML in the meantime |
How do you install it? |
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. |
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? |
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
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. |
firebaseuiはコミットの頻度が低く、firebase@9で匿名アカウントをアップグレードできないバグなどが直りそうな気配がないため firebase/firebaseui-web#877 (comment)
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? |
No. If you check the latest commits you'll see they just updated |
Any timeline for this issue? |
Related: #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. |
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,
The text was updated successfully, but these errors were encountered: