Skip to content

add doc for reset-password maker #13581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,7 @@ Authentication (Identifying/Logging in the User)
:maxdepth: 1

security/form_login_setup
security/reset_password
security/json_login_setup
security/guard_authentication
security/password_migration
Expand Down
28 changes: 28 additions & 0 deletions security/reset_password.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
How to Add a Reset Password Feature
===================================

Using `MakerBundle`_ & `SymfonyCastsResetPasswordBundle`_ you can create a
secure out of the box solution to handle forgotten passwords.

First, make sure you have a security ``User`` class. Follow
the :doc:`Security Guide </security>` if you don't have one already.

Generating the Reset Password Code
----------------------------------

.. code-block:: terminal
$ php composer require symfonycasts/reset-password-bundle
.....
$ php bin/console make:reset-password
The `make:reset-password` command will ask you a few questions about your app and
generate all the files you need! After, you'll see a success message and a list
of any other steps you need to do.

You can customize the reset password bundle's behavior by updating the ``reset_password.yaml``
file. For more information on the configuration, check out the
`SymfonyCastsResetPasswordBundle`_ guide.

.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
.. _`SymfonyCastsResetPasswordBundle`: https://github.com/symfonycasts/reset-password-bundle