app/home/home.js
/**
       * initApp handles setting up UI event listeners and registering Firebase auth listeners:
       *  - firebase.auth().onAuthStateChanged: This listener is called when the user is signed in or
       *    out, and that is where we update the UI.
       */
initApp handles setting up UI event listeners and registering Firebase auth listeners:
- firebase.auth().onAuthStateChanged: This listener is called when the user is signed in or
out, and that is where we update the UI.
initApp handles setting up UI event listeners and registering Firebase auth listeners : - firebase . auth () . onAuthStateChanged : This listener is called when the user is signed in or out and that is where we update the UI .
function initApp() {
        firebase.auth().onAuthStateChanged(function(user) {
          if (user) {
            var displayName = user.displayName;
            var email = user.email;
            var emailVerified = user.emailVerified;
            var photoURL = user.photoURL;
            var isAnonymous = user.isAnonymous;
            var uid = user.uid;
            var providerData = user.providerData;
            document.getElementById('quickstart-sign-in-status').textContent = 'Signed in';
            document.getElementById('quickstart-sign-in').textContent = 'Log out';
            document.getElementById('quickstart-account-details').textContent = JSON.stringify(user, null, '  ');
          } else {
            document.getElementById('quickstart-sign-in-status').textContent = 'Signed out';
            document.getElementById('quickstart-sign-in').textContent = 'Log in with Facebook';
            document.getElementById('quickstart-account-details').textContent = 'null';
            document.getElementById('quickstart-oauthtoken').textContent = 'null';
          }
          document.getElementById('quickstart-sign-in').disabled = false;
        });
        document.getElementById('quickstart-sign-in').addEventListener('click', toggleSignIn, false);
      }
function initApp ( ) { firebase . auth ( ) . onAuthStateChanged ( function ( user ) { if ( user ) { var displayName = user . displayName ; var email = user . email ; var emailVerified = user . emailVerified ; var photoURL = user . photoURL ; var isAnonymous = user . isAnonymous ; var uid = user . uid ; var providerData = user . providerData ; document . getElementById ( 'quickstart-sign-in-status' ) . textContent = 'Signed in' ; document . getElementById ( 'quickstart-sign-in' ) . textContent = 'Log out' ; document . getElementById ( 'quickstart-account-details' ) . textContent = JSON . stringify ( user , null , '  ' ) ; } else { document . getElementById ( 'quickstart-sign-in-status' ) . textContent = 'Signed out' ; document . getElementById ( 'quickstart-sign-in' ) . textContent = 'Log in with Facebook' ; document . getElementById ( 'quickstart-account-details' ) . textContent = 'null' ; document . getElementById ( 'quickstart-oauthtoken' ) . textContent = 'null' ; } document . getElementById ( 'quickstart-sign-in' ) . disabled = false ; } ) ; document . getElementById ( 'quickstart-sign-in' ) . addEventListener ( 'click' , toggleSignIn , false ) ; }
initApp handles setting up UI event listeners and registering Firebase auth listeners:
  - firebase.auth().onAuthStateChanged: This listener is called when the user is signed in or
    out, and that is where we update the UI.
initApp handles setting up UI event listeners and registering Firebase auth listeners : - firebase . auth () . onAuthStateChanged : This listener is called when the user is signed in or out and that is where we update the UI .
// Listening for auth state changes. // [START authstatelistener] // User is signed in. // [START_EXCLUDE] // [END_EXCLUDE] // User is signed out. // [START_EXCLUDE] // [END_EXCLUDE] // [START_EXCLUDE] // [END_EXCLUDE] // [END authstatelistener]