Skip to content

Commit 3051442

Browse files
committed
minor #8941 Added tip to enable CsrfTokenManager as service (jonasarts, javiereguiluz)
This PR was merged into the 4.0 branch. Discussion ---------- Added tip to enable CsrfTokenManager as service in the framework configuration file as it is required for autowiring on the ExampleFormAuthenticator constructor Commits ------- 21d42f3 Reword 9ae3f82 Added tip to enable CsrfTokenManager as service
2 parents ba43943 + 21d42f3 commit 3051442

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

security/guard_authentication.rst

Lines changed: 2 additions & 1 deletion
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``

0 commit comments

Comments
 (0)