MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / initApp

Function initApp

run/idp-sql/static/firebase.js:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18// Watch for state change from sign in
19function initApp() {
20 firebase.auth().onAuthStateChanged(user => {
21 if (user) {
22 // User is signed in.
23 document.getElementById('signInButton').innerText = 'Sign Out';
24 document.getElementById('form').style.display = '';
25 } else {
26 // No user is signed in.
27 document.getElementById('signInButton').innerText = 'Sign In with Google';
28 document.getElementById('form').style.display = 'none';
29 }
30 });
31}
32window.onload = function () {
33 initApp();
34};

Callers 1

firebase.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected