Sunday, January 19, 2020

Firebase getting "Uncaught TypeError: Cannot read property 'GoogleAuthProvider' of undefined at script.js:xy

I was trying to follow the documentation on "Adding Firebase to your Google Cloud project" but for the life of me I can't get the authentication to work.

Uncaught TypeError: Cannot read property 'GoogleAuthProvider' of undefined
    at script.js:31
Opening Chrome's development console and inspecting firebase.auth will also show that it is undefined.

Anyway, the fix is really easy but it was not apparent, at least for me, that I need to add the following in index.html.

<script src="https://www.gstatic.com/firebasejs/7.6.2/firebase-auth.js"></script>
Enjoy!

No comments:

Fedora install screen chronicle

Fedora install screen chronicle Below are links to Fedora installation screens. It is interesting to see how it has evolved over time. Fe...