You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I have a custom LoginFormAuthenticator which does this:
if (!$this->passwordEncoder->isPasswordValid($user, $credentials['password'])) {
thrownewCustomUserMessageAuthenticationException(
$this->translator->trans('login wrong password')
);
}
The passwordEncoder is Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface, which leads to MigratingPasswordEncoder which has NativePasswordEncoder as $bestEncoder - I dumped this while creating and in login process.
We had an update from v4.3.2, this code worked for the last 2 years and now I don't know how to deal with it. I checked some related issues but found nothing what would match to my problem.
@chalasr you guided me to the solution. I found out that my user comes with null password value from source data. I am very sorry, I should have checked that. With not null passwords everything works.
Symfony version(s) affected: v4.4.1 (symfony/security-bundle)
Description
I have an console import job, which creates new user objects with an insert query like this:
Then I have a custom LoginFormAuthenticator which does this:
The passwordEncoder is Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface, which leads to MigratingPasswordEncoder which has NativePasswordEncoder as $bestEncoder - I dumped this while creating and in login process.
The created password is
But the login only works if I change it to
security.yaml:
We had an update from v4.3.2, this code worked for the last 2 years and now I don't know how to deal with it. I checked some related issues but found nothing what would match to my problem.
#31758
#32166
#34113
The text was updated successfully, but these errors were encountered: