cyve / password-manager-bundle
Password management and recovery bundle for Symfony using login links
Installs: 165
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- psr/log: ^2.0|^3.0
- symfony/console: ^6.4|^7.0
- symfony/form: ^6.4|^7.0
- symfony/framework-bundle: ^6.4|^7.0
- symfony/mailer: ^6.4|^7.0
- symfony/security-bundle: ^6.4|^7.0
- symfony/twig-bundle: ^6.4|^7.0
- symfony/validator: ^6.4|^7.0
- symfony/yaml: ^6.4|^7.0
- twig/cssinliner-extra: ^3.0
- twig/extra-bundle: ^3.0
- twig/inky-extra: ^3.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/browser-kit: ^6.4
- symfony/flex: ^2.0
README
Password management and recovery bundle for Symfony using login links.
Installation
composer require cyve/password-manager-bundle
Configuration
// config/bundles.php return [ ... Cyve\PasswordManagerBundle\CyvePasswordManagerBundle::class => ['all' => true], ];
// config/routes.yaml cyve_password_manager: resource: "@CyvePasswordManagerBundle/Resources/config/routing.yaml"
// config/packages/security.yaml security: firewalls: main: login_link: check_route: app_login_check # or any login-link route signature_properties: ['userIdentifier'] # add other properties if you want
/!\ The login link contains a _target_path
query parameter to redirect the user to the /password/update
route after the login. If you change the name of the parameter in the security config, the Symfony default redirection rules will be applied.
Usage
Update a password
In a browser, go to /password/update
(require full authentication) and use the form to set a new password.
In a terminal, execute bin/console cyve:password:reset <username> <password>
Reset a password
In a browser, go to /password/request-login-link
and enter a user identifier. If the user exists, a notification email containing a login link will be sent to the user's email address. The user will be automatically redirected to the /passord/update
page after a successful login.