diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index 922fb0128bc..52f8d644a87 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -502,7 +502,7 @@ and add the following logic:: public function getCredentials(Request $request) { - $token = $request->request->get('_csrf_token'); + $csrfToken = $request->request->get('_csrf_token'); if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken('authenticate', $csrfToken))) { throw new InvalidCsrfTokenException('Invalid CSRF token.');