Comments (8)
I just ran into this and was able to get a workaround up - so far it's working for me, if anyone comes across this in the future, maybe it'll help.
It seems this error is caused when firebaseui-web-react
is passed a v9/modular firebase auth instance, instead of the v8/v9-compat firebase auth instance. In other words, if you import and initialize your auth instance like below, you'll get this error when you feed it into <StyledFirebaseAuth />
as it's firebaseAuth prop.
import { getAuth } from "firebase/auth";
import { initializeApp } from "firebase/app";
const app = initializeApp(firebaseConfig);
export const authThatWillBreakFirebaseUI = getAuth(app)
It will work if you initialize your firebase app, in the compat style and feed that into firebaseui-web-react
. Looks like this:
import "firebase/compat/auth";
import compatApp from "firebase/compat/app";
compatApp.initializeApp(firebaseConfig);
export const authForFirebaseUI = compatApp.auth()
I don't want my whole application to use the compat app, so what I did was initialize a second firebase app in the compat style. If you do this, you'll have two firebase app instances in your app - so there's a bit of overhead for managing them, but this solved my problem and allowed me to use phone sign in with this UI library.
from firebaseui-web-react.
Same issue here!!
from firebaseui-web-react.
I've run into the same issue. Any idea on what the fix is?
from firebaseui-web-react.
Same issue here, recapchta does not show and app.auth missing in console
from firebaseui-web-react.
same issue here. not clear why it was closed
from firebaseui-web-react.
any updates?
from firebaseui-web-react.
for some reason this issue was opened and closed by OP. may be he can help
from firebaseui-web-react.
I just ran into this and was able to get a workaround up - so far it's working for me, if anyone comes across this in the future, maybe it'll help.
It seems this error is caused when
firebaseui-web-react
is passed a v9/modular firebase auth instance, instead of the v8/v9-compat firebase auth instance. In other words, if you import and initialize your auth instance like below, you'll get this error when you feed it into<StyledFirebaseAuth />
as it's firebaseAuth prop.import { getAuth } from "firebase/auth"; import { initializeApp } from "firebase/app"; const app = initializeApp(firebaseConfig); export const authThatWillBreakFirebaseUI = getAuth(app)
It will work if you initialize your firebase app, in the compat style and feed that into
firebaseui-web-react
. Looks like this:import "firebase/compat/auth"; import compatApp from "firebase/compat/app"; compatApp.initializeApp(firebaseConfig); export const authForFirebaseUI = compatApp.auth()
I don't want my whole application to use the compat app, so what I did was initialize a second firebase app in the compat style. If you do this, you'll have two firebase app instances in your app - so there's a bit of overhead for managing them, but this solved my problem and allowed me to use phone sign in with this UI library.
thank you so much for leave this back, many people are scratching their heads for this problem
from firebaseui-web-react.
Related Issues (20)
- Unhandled Runtime Error - TypeError: Cannot read property 'initializeApp' of undefined HOT 3
- One tap login not working HOT 7
- /example/README.md doesn't mention creating an app first HOT 2
- Firebase-config.json is not created! HOT 1
- Support React 18 HOT 6
- React 18 StrictMode causes "AuthUI instance is deleted" error HOT 4
- StyledFirebaseAuth does not render with firebase ^9.8.1 HOT 3
- Question: how to get a refresh token
- Cannot Install in React 18.2 HOT 5
- Styledfirebaseui don't know my initializaion HOT 2
- StyledFirebaseAuth not working with nextjs HOT 8
- `StyledFirebaseAuth` cannot be used as a JSX component HOT 1
- AnonymousAuthProvider signInOptions does not work; Throw a TypeError.
- React strict mode compatibility HOT 1
- [email protected] is not compatible with [email protected] HOT 11
- Is this project maintained? HOT 6
- Is there a builtin rate-limiter or CAPTCHA in this?
- How do I add a custom domain redirect to this auth? HOT 1
- Link with Multiple Accounts is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebaseui-web-react.