diff --git a/security/csrf_in_login_form.rst b/security/csrf_in_login_form.rst index 3551c82764c..6b29646f41d 100644 --- a/security/csrf_in_login_form.rst +++ b/security/csrf_in_login_form.rst @@ -16,8 +16,14 @@ for CSRF. In this article you'll learn how you can use it in your login form. Configuring CSRF Protection --------------------------- -First, make sure that the CSRF protection is enabled in the main configuration -file: +First, install the CSRF support in your project (which in turn requires installing +the Symfony Form component): + +.. code-block:: terminal + + $ composer require security-csrf form + +Then, enable the CSRF protection in the framework configuration file: .. configuration-block:: @@ -52,8 +58,8 @@ file: 'csrf_protection' => null, )); -Then, the security component needs a CSRF token provider. You can set this to -use the default provider available in the security component: +The security component needs a CSRF token provider. You can set this to use the +default provider available in the security component: .. configuration-block::