* initApp handles setting up the Firebase context and registering * callbacks for the auth status. * * The core initialization is in firebase.App - this is the glue class * which stores configuration. We provide an app name here to allow * distinguishing multiple app instances. * * This metho
()
| 22 | * When signed in, we also authenticate to the Firebase Realtime Database. |
| 23 | */ |
| 24 | function initApp() { |
| 25 | // Listen for auth state changes. |
| 26 | firebase.auth().onAuthStateChanged(function(user) { |
| 27 | console.log('User state change detected from the Background script of the Chrome Extension:', user); |
| 28 | }); |
| 29 | } |
| 30 | |
| 31 | window.onload = function() { |
| 32 | initApp(); |