sajad torkamani

Install the SecurityBundle

composer require symfony/security-bundle

Assuming, you have Symfony Flex installed, this should create a security.yaml file too.

Create User entity

Create the entity:

bin/console make:user

Add more fields if needed and then generate migrations:

bin/console make:migrations && bin/console doc:mig:mig

Add a login form

bin/console make:security:form-login

This will:

  • Create a SecurityController
  • Create a templates/security/login.html.twig template
  • Update security.yaml so that the main firewall uses the form_login authenticator

Add a reset password form

composer require symfonycasts/reset-password-bundle
php bin/console make:reset-password

Add a registration form

composer require symfonycasts/verify-email-bundle &&
php bin/console make:registration-form

Follow any instructions that show after running that command.