@@ -24,9 +24,8 @@ my password, etc.)
2424Using the Login Link Authenticator
2525----------------------------------
2626
27- This guide assumes you have setup security and have created a user object
28- in your application. Follow :doc: `the main security guide </security >` if
29- this is not yet the case.
27+ This guide assumes you have :doc: `setup security and have created a user object </security >`
28+ in your application.
3029
31301) Configure the Login Link Authenticator
3231~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -164,9 +163,8 @@ intercept requests to this route:
164163 2) Generate the Login Link
165164~~~~~~~~~~~~~~~~~~~~~~~~~~
166165
167- Now that the authenticator is able to check the login links, you must
168- create a page where a user can request a login link and log in to your
169- website.
166+ Now that the authenticator is able to check the login links, you can
167+ create a page where a user can request a login link.
170168
171169The login link can be generated using the
172170:class: `Symfony\\ Component\\ Security\\ Http\\ LoginLink\\ LoginLinkHandlerInterface `.
@@ -189,7 +187,7 @@ this interface::
189187 */
190188 public function requestLoginLink(LoginLinkHandlerInterface $loginLinkHandler, UserRepository $userRepository, Request $request)
191189 {
192- // check if login form is submitted
190+ // check if form is submitted
193191 if ($request->isMethod('POST')) {
194192 // load the user in some way (e.g. using the form input)
195193 $email = $request->request->get('email');
@@ -203,16 +201,16 @@ this interface::
203201 // ... send the link and return a response (see next section)
204202 }
205203
206- // if it's not submitted, render the "login " form
207- return $this->render('security/login .html.twig');
204+ // if it's not submitted, render the "request " form
205+ return $this->render('security/request_login_link .html.twig');
208206 }
209207
210208 // ...
211209 }
212210
213211.. code-block :: html+twig
214212
215- {# templates/security/login .html.twig #}
213+ {# templates/security/request_login_link .html.twig #}
216214 {% extends 'base.html.twig' %}
217215
218216 {% block body %}
@@ -802,7 +800,7 @@ features such as the locale used to generate the link::
802800 // ...
803801 }
804802
805- return $this->render('security/login .html.twig');
803+ return $this->render('security/request_login_link .html.twig');
806804 }
807805
808806 // ...
0 commit comments