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:

Installing TigerVNC in Ubuntu 24.04

Installing TigerVNC in Ubuntu 24.04 Ubuntu 24.04 supports RPD protocol but it behaves in a way that is not fit for my needs. The Desktop Sh...