code: public void addAuthListener(final StitchAuthListener listener) {
      listeners.put(listener, Boolean.TRUE);
  
      // Trigger the onUserLoggedIn event in case some event happens and
      // this caller would miss out on this event other wise.
      onAuthEvent(listener);
      dispatcher.dispatchTask(
          new Callable<Void>() {
            @Override
            public Void call() {
              listener.onListenerRegistered(StitchAuthImpl.this);
              return null;
            }
          });
    }
docs: Adds a listener for any important auth event.
  
  @see StitchAuthListener