Update login handling to allow default redirection and adjust security settings

This commit is contained in:
mathis 2026-02-27 13:53:53 +01:00
parent 25a477a8f9
commit 2d72515f0c
2 changed files with 6 additions and 1 deletions

View File

@ -58,7 +58,7 @@ security:
check_path: app_login check_path: app_login
enable_csrf: true enable_csrf: true
default_target_path: app_index default_target_path: app_index
use_referer: true always_use_default_target_path: false
logout: logout:
path: app_logout path: app_logout
enable_csrf: false enable_csrf: false

View File

@ -89,6 +89,11 @@ class LoginSubscriber implements EventSubscriberInterface
$response->headers->clearCookie('logout_origin', '/'); $response->headers->clearCookie('logout_origin', '/');
$event->setResponse($response); $event->setResponse($response);
} else {
// Pas de cookie logout_origin : laisser Symfony gérer la redirection par défaut
$this->logger->info('Normal login - using default target path', [
'user' => $user?->getUserIdentifier()
]);
} }
} }
} }