Skip to content
Open
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
6 changes: 6 additions & 0 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,12 @@ After this, you have protected your login form against CSRF attacks.
the token ID by setting ``csrf_token_id`` in your configuration. See
:ref:`reference-security-firewall-form-login` for more details.

.. tip::

the ``data-controller`` part is related to the usage of
https://symfony.com/doc/current/security/csrf.html#generating-csrf-token-using-javascript
It can be removed if you use statefull session storage, not stateless.
Comment on lines +1024 to +1026
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's useful to hint this can be removed. But it's always good to explain why the attribute is here:

Suggested change
the ``data-controller`` part is related to the usage of
https://symfony.com/doc/current/security/csrf.html#generating-csrf-token-using-javascript
It can be removed if you use statefull session storage, not stateless.
The ``data-controller`` attribute is needed for [internal link here, not absolute URL].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I agree, I can rework it if its accepted
my point was mostly to document why this data attribute is here in the doc (and also on console maker processes)


.. _security-json-login:

JSON Login
Expand Down