Skip to content

Commit 21d42f3

Browse files
Reword
1 parent 9ae3f82 commit 21d42f3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

security/guard_authentication.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ Adding CSRF Protection
484484
If you're using a Guard authenticator to build a login form and want to add CSRF
485485
protection, no problem!
486486

487-
First, :ref:`add the _csrf_token to your login template <csrf-login-template>`.
487+
First, check that :ref:`the csrf_protection option <reference-framework-csrf-protection>`
488+
is enabled and :ref:`add the _csrf_token field to your login form <csrf-login-template>`.
488489

489490
Then, type-hint ``CsrfTokenManagerInterface`` in your ``__construct()`` method
490491
(or manually configure the ``Symfony\Component\Security\Csrf\CsrfTokenManagerInterface``
@@ -519,11 +520,6 @@ service to be passed) and add the following logic::
519520

520521
// ...
521522
}
522-
523-
.. tip::
524-
525-
  Don't forget to enable `csrf_protection` in the `config/framework.yml` file that
526-
CsrfTokenManagerInterface can get autowired.
527523

528524
Frequently Asked Questions
529525
--------------------------

0 commit comments

Comments
 (0)