-
Notifications
You must be signed in to change notification settings - Fork 31
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 npm "^9.x" support #145
Comments
Just chiming in here cause I'm hoping for an easy upgrade path |
For Firebase 9, you should be able to use the /app/ compatibility imports as a short term workaround, e.g. import firebase from "firebase/compat/app";
import "firebase/compat/auth";
import "firebase/compat/database";
import "firebase/compat/storage"; and so on. Then it should all work the same as for Firebase 8. Full Firebase 9 support looks to be a hefty rewrite though. There are no more "give me everything" import statements. You have to import just what you need now. I managed to get an example app to build my changing my code like so: import {initializeApp} from "firebase/app";
import {getAuth, GoogleAuthProvider, GithubAuthProvider, TwitterAuthProvider, FacebookAuthProvider} from "firebase/auth";
import "firebase/database";
import withFirebaseAuth from "react-with-firebase-auth";
// You must supply this!
import firebaseConfigObj from "./firebaseconfig/firebase-config.json";
const firebaseApp = initializeApp(firebaseConfigObj);
const firebaseAppAuth = getAuth();
const providers = {
googleProvider: new GoogleAuthProvider(),
githubProvider: new GithubAuthProvider(),
twitterProvider: new TwitterAuthProvider(),
facebookProvider: new FacebookAuthProvider()
};
const App = props => {
// app component here
};
export default withFirebaseAuth({
providers,
firebaseAppAuth
})(App); But it didn't actually work to log me in. It returned this error:
which, indeed, it isn't now. With Firebase 9 you would have to import that function in directly too: import {signInWithEmailAndPassword} from "firebase/auth"; And that's deep in the library code, sadly. |
Is your feature request related to a problem? Please describe.
Are you thinking about to support the new package of firebase (version 9+)
Describe the solution you'd like
As an expected please support of new firebase package
Describe alternatives you've considered
As alternative the firebase package already provide the ability (developed by their-self ) of authentication service
The text was updated successfully, but these errors were encountered: