'onLogout']; } public function onLogout(LogoutEvent $event): void { // get the security token of the session that is about to be logged out // get the current request $request = $event->getRequest(); // get the current response, if it is already set by another listener $response = $event->getResponse(); // configure a custom logout response to the homepage $response = $this->hydra->handleLogoutRequest($request); $event->setResponse($response); } }