Open harry-herskowitz opened 2 years ago
Hi, I have exactly the same issue. Any idea when this could be fixed?
Thanks!
you can do a --force like it says in the prompt and see if it works
I'm going to work on differents features of my project, waiting for an update of this plugin, but I might try the --force option indeed. Did you?
nope! I went the same route haha. Good luck!
Haha you too mate!
Maybe there's a way to use the firebase 'compat' API to speed things along? https://firebase.google.com/docs/web/modular-upgrade#about_the_compat_libraries. Just as a bit of context, I'm also looking to use this package in my firebase v9 app.
Yes, maybe changing all the imports from 'firebase/auth' to 'firebase/compat/auth' would be a temporary solution
Have you checked out this repo? https://github.com/robingenz/capacitor-firebase-authentication
Yes I've tried signing in with Apple and Google with this plugin but neither worked
For anyone needing an immediate solution, what I did was manually updated all the firebase imports in capacitor-firebase-auth in my node_modules to use the firebase/compat/* APIs. Afterwards, I ran npx patch-package capacitor-firebase-auth
to generate a diff that is used to patch this package automatically any time npm install
is ran. In my package.json scripts, I have a postinstall script that executes npx patch-package
. This has allowed me to update to the latest firebase sdk. I expect to be able to remove this band-aid once an official update that supports firebase 9 is released. In the meantime, hope this solution helps some of you who are in the same boat as me! https://github.com/ds300/patch-package
See PR https://github.com/baumblatt/capacitor-firebase-auth/pull/199 which I just reviewed. Note the link I mentioned in the comment https://harryherskowitz.com/2021/08/23/firebase-capacitor.html This solves https://github.com/firebase/firebase-js-sdk/issues/5019 which you will run into if you are using this plugin for an iOS app.
Just to be safe - I uploaded my changes (which have been tested and used in my app) as a PR https://github.com/baumblatt/capacitor-firebase-auth/pull/204. Changes are pretty much the same as in https://github.com/baumblatt/capacitor-firebase-auth/pull/199 @baumblatt FYI
npm ERR! dev firebase@"^9.0.2" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer firebase@"^8.3.0" from capacitor-firebase-auth@3.0.0