Closed G-Nation closed 2 years ago
The v1 canary isn't intended to support Firebase compat mode. You can initialize Firebase yourself with compat mode before initializing next-firebase-auth
and it should work, though I haven't tested this to confirm.
But if i dont use the compat mode of Firebase the "firebase.auth.EmailAuthProvider.PROVIDER_ID" is not recognized as a fuction. I'll try to initialize firebase on the initAuth.js file.
Have you taken a look at at the v1.x (canary) version of the demo app? It uses EmailAuthProvider with modular Firebase: https://github.com/gladly-team/next-firebase-auth/tree/v1.x/example
Thank you!! The code from de v1.x branch was the solution
Describe the bug I get the FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app-compat/no-app) when i call the FirebaseAuth.js component on any page. The code of the FirebaseAuth.js component is the same as in the example. I only changed this two imports: import firebase from 'firebase/compat/app'; import 'firebase/compat/auth';
Versions
To Reproduce Steps to reproduce the behavior: I have an login.js page were I call the FirebaseAuth.js component and thats all the code i have on it. The code of the component is the same as in the example.