diff --git a/security/form_login_setup.rst b/security/form_login_setup.rst index 7e82ef333a4..1f48401571f 100644 --- a/security/form_login_setup.rst +++ b/security/form_login_setup.rst @@ -99,12 +99,13 @@ Edit the ``security.yaml`` file in order to declare the ``/logout`` path: security: # ... - providers: - # ... - logout: - path: app_logout - # where to redirect after logout - # target: app_any_route + firewalls: + main: + # ... + logout: + path: app_logout + # where to redirect after logout + # target: app_any_route .. code-block:: xml @@ -117,8 +118,11 @@ Edit the ``security.yaml`` file in order to declare the ``/logout`` path: https://symfony.com/schema/dic/services/services-1.0.xsd"> - + + + + @@ -127,12 +131,15 @@ Edit the ``security.yaml`` file in order to declare the ``/logout`` path: // config/packages/security.php $container->loadFromExtension('security', [ // ... - 'access_control' => [ - [ - 'path' => '^/login', - 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY', + 'firewalls' => [ + 'main' => [ + // ... + 'logout' => [ + 'path' => 'app_logout', + // where to redirect after logout + 'target' => 'app_any_route' + ], ], - // ... ], ]);