@@ -20,9 +20,8 @@ my password, etc.)
2020Using the Login Link Authenticator
2121----------------------------------
2222
23- This guide assumes you have setup security and have created a user object
24- in your application. Follow :doc: `the main security guide </security >` if
25- this is not yet the case.
23+ This guide assumes you have :doc: `setup security and have created a user object </security >`
24+ in your application.
2625
27261) Configure the Login Link Authenticator
2827~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,9 +159,8 @@ intercept requests to this route:
160159 2) Generate the Login Link
161160~~~~~~~~~~~~~~~~~~~~~~~~~~
162161
163- Now that the authenticator is able to check the login links, you must
164- create a page where a user can request a login link and log in to your
165- website.
162+ Now that the authenticator is able to check the login links, you can
163+ create a page where a user can request a login link.
166164
167165The login link can be generated using the
168166:class: `Symfony\\ Component\\ Security\\ Http\\ LoginLink\\ LoginLinkHandlerInterface `.
@@ -185,7 +183,7 @@ this interface::
185183 */
186184 public function requestLoginLink(LoginLinkHandlerInterface $loginLinkHandler, UserRepository $userRepository, Request $request)
187185 {
188- // check if login form is submitted
186+ // check if form is submitted
189187 if ($request->isMethod('POST')) {
190188 // load the user in some way (e.g. using the form input)
191189 $email = $request->request->get('email');
@@ -199,16 +197,16 @@ this interface::
199197 // ... send the link and return a response (see next section)
200198 }
201199
202- // if it's not submitted, render the "login " form
203- return $this->render('security/login .html.twig');
200+ // if it's not submitted, render the "request " form
201+ return $this->render('security/request_login_link .html.twig');
204202 }
205203
206204 // ...
207205 }
208206
209207.. code-block :: html+twig
210208
211- {# templates/security/login .html.twig #}
209+ {# templates/security/request_login_link .html.twig #}
212210 {% extends 'base.html.twig' %}
213211
214212 {% block body %}
@@ -824,7 +822,7 @@ features such as the locale used to generate the link::
824822 // ...
825823 }
826824
827- return $this->render('security/login .html.twig');
825+ return $this->render('security/request_login_link .html.twig');
828826 }
829827
830828 // ...
0 commit comments