Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update security.rst
  • Loading branch information
ThomasLandauer authored Apr 21, 2024
commit 92a8fe849e1af1c734998a2fe73450989e9eb6ef
6 changes: 3 additions & 3 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,9 @@ First, you need to enable CSRF on the form login:

.. _csrf-login-template:

Then, use the ``csrf_token()`` function in the Twig template to generate a CSRF
token and store it as a hidden field of the form. By default, the HTML field
is called ``_csrf_token`` and takes an arbitrary string as argument ``tokenId``:
Then, add a hidden field to the form. In order to work with the built-in ``FormLoginAuthenticator``,
the HTML field must be called ``_csrf_token``, and the argument of Twig's ``csrf_token()`` function
must be called ``authenticate``:

.. code-block:: html+twig

Expand Down