8000 Minor rewords · symfony/symfony-docs@1fc80af · GitHub
[go: up one dir, main page]

Skip to content

Commit 1fc80af

Browse files
Minor rewords
1 parent 93cf9bd commit 1fc80af

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

security/form_login.rst

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,9 @@ this by setting ``use_referer`` to true (it defaults to false):
221221
Redirecting on Login Failure
222222
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
223223

224-
In addition to redirecting the user after a successful login, you can also set
225-
the URL that the user should be redirected to after a failed login (e.g. an
226-
invalid username or password was submitted). By default, the user is redirected
227-
back to the login form itself. You can set this to a different route (e.g.
228-
``login_failure``) with the following config:
224+
After a failed login (e.g. an invalid username or password was submitted), the
225+
user is redirected back to the login form itself. Use the ``failure_path``
226+
option to define the route or URL the user is redirected to:
229227

230228
.. configuration-block::
231229

@@ -283,9 +281,8 @@ Control the Redirect URL from inside the Form
283281
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
284282

285283
You can also override where the user is redirected to via the form itself by
286-
including a hidden field with the name ``_target_path`` for success and
287-
``_failure_path`` for failure. For example, to redirect to the URL defined
288-
by some ``account`` route, use the following:
284+
including a hidden field with the name ``_target_path`` for successful logins
285+
and ``_failure_path`` for login errors:
289286

290287
.. configuration-block::
291288

@@ -331,9 +328,8 @@ by some ``account`` route, use the following:
331328

332329
Now, the user will be redirected to the value of the hidden form field. The
333330
value attribute can be a relative path, absolute URL, or a route name.
334-
You can even change the name of the hidden form field by changing the
335-
``target_path_parameter`` and ``failure_path_parameter`` options to another
336-
value.
331+
The name of the hidden fields in the login form is also configurable using the
332+
``target_path_parameter`` and ``failure_path_parameter`` options of the firewall.
337333

338334
.. configuration-block::
339335

0 commit comments

Comments
 (0)
0