authenticationUtils->getLastAuthenticationError(); // last username entered by the user $lastUsername = $this->authenticationUtils->getLastUsername(); if ($error instanceof AuthenticationException) { $this->addFlash(FlashType::Danger, $this->translator->trans($error->getMessageKey(), $error->getMessageData(), 'security')); } return $this->render('backoffice/login/login.html.twig', [ 'last_username' => $lastUsername, 'error' => $error, ]); } #[Route(path: '/logout', name: 'tvdt_login_logout')] public function logout(): never { throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); } }