function authInit() {


  // this is about signing in and out
  firebaseAuth.onAuthStateChanged(
    user => {
      const state = Process.store.getState();

      if (user && state.auth.uid && state.auth.uid === user.uid) {
        // do nothing as this can get fired on a refresh token, 
        // but the user hasnt actually changed
    
      }
      else {

        // we've received a new user
        Process.store.dispatch(acAuthUser(user));
        
        // and we'll get or create the accounts in parallel
        const ad = acFetchAccounts(user);
        if (ad) {
          Process.store.dispatch(acFetchAccounts(user));
        }

      }
    }
  );
}
/**
 * set up a listener for changes in user
 * and dispatch a user action if it happens
 */
set up a listener for changes in user
and dispatch a user action if it happens
set up a listener for changes in user and dispatch a user action if it happens
function authInit() {
  firebaseAuth.onAuthStateChanged(
    user => {
      const state = Process.store.getState();
      if (user && state.auth.uid && state.auth.uid === user.uid) {
      }
      else {
        Process.store.dispatch(acAuthUser(user));
        const ad = acFetchAccounts(user);
        if (ad) {
          Process.store.dispatch(acFetchAccounts(user));
        }
      }
    }
  );
}
function authInit ( ) { firebaseAuth . onAuthStateChanged ( user => { const state = Process . store . getState ( ) ; if ( user && state . auth . uid && state . auth . uid === user . uid ) { } else { Process . store . dispatch ( acAuthUser ( user ) ) ; const ad = acFetchAccounts ( user ) ; if ( ad ) { Process . store . dispatch ( acFetchAccounts ( user ) ) ; } } } ) ; }
set up a listener for changes in user
 and dispatch a user action if it happens
set up a listener for changes in user and dispatch a user action if it happens
// this is about signing in and out // do nothing as this can get fired on a refresh token,  // but the user hasnt actually changed // we've received a new user // and we'll get or create the accounts in parallel