The dummy user's credentials:
- Username:
[email protected]
- Password:
secret
- Run
make up
to start the Docker containers - Run
make setup-database
to create the DB schema and load fixtures - The app is available at
http://localhost:8080
- Go to
http://localhost:8080/login
- Log in using the credentials from above
Symfony will use legacy_md5_password_encoder
because the User entity implements PasswordHasherAwareInterface
. The legacy hasher's needsRehash
always returns true so Symfony will re-hash the user's plaintext password using the legacy hasher.
- Remove the
PasswordHasherAwareInterface
implementation fromsrc/Entity/User.php
- Go to
http://localhost:8080/login
- Log in using the credentials from above
Symfony will now use vendor/symfony/password-hasher/Hasher/MigratingPasswordHasher.php
to verify the given password because it doesn't seem to know this user needs to use the legacy hasher. Login fails due to usage of wrong hasher.