File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -662,7 +662,33 @@ Most websites have a login form where users authenticate using an
662
662
identifier (e.g. email address or username) and a password. This
663
663
functionality is provided by the *form login authenticator *.
664
664
665
- First, create a controller for the login form:
665
+ `MakerBundle ` has a new ``make:security:form-login `` command that was introduced
666
+ in ``v1.x.x `` that will generate the controller, twig template, and configure
667
+ ``security.yaml `` after answering a couple of questions:
668
+
669
+ .. code-block :: terminal
670
+
671
+ $ php bin/console make:security:form-login
672
+
673
+ Choose a name for the controller class (e.g. SecurityController) [SecurityController]:
674
+ > SecurityController
675
+
676
+ Do you want to generate a '/logout' URL? (yes/no) [yes]:
677
+ > y
678
+
679
+ created: src/Controller/SecurityController.php
680
+ created: templates/security/login.html.twig
681
+ updated: config/packages/security.yaml
682
+
683
+
684
+ Success!
685
+
686
+
687
+ Next: Review and adapt the login template: ssecurity/login.html.twig to suite your needs.
688
+
689
+ WooHoo! You're all set to start authenticating users.
690
+
691
+ If you prefer to do this manually, first, create a controller for the login form:
666
692
667
693
.. code-block :: terminal
668
694
You can’t perform that action at this time.
0 commit comments