8000 The security component must be installed to use csrf_token() by javiereguiluz · Pull Request #8821 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions security/csrf_in_login_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down Expand Up @@ -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::

Expand Down
0