Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 17fdd2e

Browse filesBrowse files
javiereguiluzxabbuh
authored andcommitted
Reworded the help note
1 parent b948747 commit 17fdd2e
Copy full SHA for 17fdd2e

File tree

Expand file treeCollapse file tree

1 file changed

+12
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-4
lines changed

‎security/csrf_in_login_form.rst

Copy file name to clipboardExpand all lines: security/csrf_in_login_form.rst
+12-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.