"Cannot read property 'PROVIDER_ID' of undefined" error on version 2.1.1
See original GitHub issueFor some reason, when clicking on any button results on this JavaScript error
firebaseui.js:331 Uncaught TypeError: Cannot read property 'PROVIDER_ID' of undefined
at firebaseui.js:331
at b (firebaseui.js:331)
at firebaseui.js:73
at ol.<anonymous> (firebaseui.js:273)
at cf (firebaseui.js:148)
at Bg.h.dispatchEvent (firebaseui.js:147)
at Dg (firebaseui.js:184)
at Bg.Tc (firebaseui.js:183)
at af (firebaseui.js:144)
at HTMLButtonElement.We (firebaseui.js:145)
My initialization code:
<script>
var config = window.settings.FirebaseCredentials;
firebase.initializeApp(config);
</script>
<script src="https://cdn.firebase.com/libs/firebaseui/2.1.1/firebaseui.js"></script>
<script>
var uiConfig = {
signInSuccessUrl: "/",
signInOptions: [
// Leave the lines as is for the providers you want to offer your users.
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.GithubAuthProvider.PROVIDER_ID,
firebase.auth.TwitterAuthProvider.PROVIDER_ID,
firebase.auth.FacebookAuthProvider.PROVIDER_ID
],
tosUrl: "http://howlbits.com"
};
// Initialize the FirebaseUI Widget using Firebase.
var ui = new firebaseui.auth.AuthUI(firebase.auth());
// The start method will wait until the DOM is loaded.
ui.start('#firebase-auth-container', uiConfig);
...
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Cannot read property 'GoogleAuthProvider' of undefined ...
but i'm getting this error when i access the page. (index):49 Uncaught TypeError: Cannot read property 'GoogleAuthProvider' of undefined at ...
Read more >cannot read properties of undefined (reading 'auth') firebase
i am new to using react native and firebase, I have this error: "TypeError: Cannot read property 'auth' of undefined" I proceed to...
Read more >Easily add sign-in to your Web app with FirebaseUI - Google
In the Firebase console, open the Authentication section and enable email and password authentication. · Add the email provider ID to the list...
Read more >firebase - UNPKG
The object\n * is not found if null or undefined. If you are using a compilation pass that\n * renames property names beware...
Read more >OCPI 2.2 - EVRoaming Foundation
OCPI 2.1.1 is a different protocol version of OCPI than OCPI 2.1. ... Otherwise the data field is unspecified and MAY be omitted,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding <script src="https://www.gstatic.com/firebasejs/6.3.2/firebase-auth.js"></script> worked for me
Thank you! This did lead to a solution but interestingly, it was nothing to do with firebaseAuthObj and everything to do with importing firebase and firebaseui. I had used
Changing this simply to:
Made it work. Interesting that the way I was doing it actually gave me working access to cloud firestore, but problems with firebase auth. Anyway, thanks very much for the help, still fairly new to React and ES6. Hopefully this can help someone else if they ever come across it.