8000 Reworded the help note · symfony/symfony-docs@17fdd2e · GitHub
[go: up one dir, main page]

Skip to content

Commit 17fdd2e

Browse files
javiereguiluzxabbuh
authored andcommitted
Reworded the help note
1 parent b948747 commit 17fdd2e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

security/csrf_in_login_form.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@ for CSRF. In this article you'll learn how you can use it in your login form.
1616
Configuring CSRF Protection
1717
---------------------------
1818

19-
First, configure the Security component so it can use CSRF protection.
20-
The Security component needs a CSRF token provider. You can set this to use the default
21-
provider available in the Security component:
19+
First, make sure that the CSRF protection is enabled in the main cofiguration
20+
file:
21+
22+
.. code-block:: yaml
23+
24+
# app/config/config.yml
25+
framework:
26+
# ...
27+
csrf_protection: ~
28+
29+
Then, the security component needs a CSRF token provider. You can set this to
30+
use the default provider available in the security component:
2231

2332
.. configuration-block::
2433

@@ -74,7 +83,6 @@ provider available in the Security component:
7483
7584
The Security component can be configured further, but this is all information
7685
it needs to be able to use CSRF in the login form.
77-
Note: Make sure that CSRF Protection is enabled in ``config.yml``.
7886

7987
Rendering the CSRF field
8088
------------------------

0 commit comments

Comments
 (0)
0