diff --git a/config/packages/security.yaml b/config/packages/security.yaml index f695019..29999da 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -20,14 +20,14 @@ security: provider: app_user_provider form_login: - login_path: app_login - check_path: app_login + login_path: _login + check_path: _login enable_csrf: true csrf_token_id: authenticate logout: - path: app_logout - target: app_login + path: _logout + target: _login diff --git a/src/Controller/AuthenticationController.php b/src/Controller/AuthenticationController.php index 94fec26..d8e6b43 100644 --- a/src/Controller/AuthenticationController.php +++ b/src/Controller/AuthenticationController.php @@ -9,7 +9,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; class AuthenticationController extends AbstractController { - #[Route(path: '/', name: 'app_login')] + #[Route(path: '/', name: '_login')] public function login(AuthenticationUtils $authenticationUtils): Response { // get the login error if there is one @@ -24,7 +24,7 @@ class AuthenticationController extends AbstractController ]); } - #[Route(path: '/logout', name: 'app_logout')] + #[Route(path: '/logout', name: '_logout')] public function logout(): void { throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); diff --git a/templates/login/index.html.twig b/templates/login/index.html.twig index cae5255..a1ee3c7 100644 --- a/templates/login/index.html.twig +++ b/templates/login/index.html.twig @@ -32,7 +32,7 @@ {% if app.user %}