diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index 8af6551646a..3886b80b5e2 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -484,7 +484,8 @@ Adding CSRF Protection If you're using a Guard authenticator to build a login form and want to add CSRF protection, no problem! -First, :ref:`add the _csrf_token to your login template `. +First, check that :ref:`the csrf_protection option ` +is enabled and :ref:`add the _csrf_token field to your login form `. Then, type-hint ``CsrfTokenManagerInterface`` in your ``__construct()`` method (or manually configure the ``Symfony\Component\Security\Csrf\CsrfTokenManagerInterface``