code: public function install(ApplicationInterface $app)
      {
          try{
              $session = (new ExtendedSessionFactory())->newInstance($_COOKIE);
              $session = new AuraSessionAdapter($session);
              $app->session($session);
  
              // fire event
              $app->eventstream()->channel(Channels::SYSTEM)->push(Events::SESSION_ATTACHED, $session);
          }
          catch(\Throwable $e){
              throw new ModuleInstallationException(self::class, $e->getMessage(), $e);
          }
      }
docs: Install module
  
  @param ApplicationInterface $app
  
  @throws ModuleInstallationException