Closed
Description
Symfony version(s) affected
7.2.*
Description
After upgrading to 7.2 I get the following error when logging in a user programmatically:
Unable to find an authenticator named "form_login" for the firewall "main". Available authenticators: "debug.security.authenticator.login_link.main", "debug.security.authenticator.form_login.main", "debug.security.authenticator.remember_me.main".
I think the issue is probably caused by this change: #59278
I suspect this is a bug and I am not sure how to work around it. Using the aliases that the error message proposes is not a solution, as these do not exist in the prod environment.
How to reproduce
My firewall setup:
firewalls:
main:
lazy: true
provider: app_user_provider
form_login:
login_path: app_login
check_path: app_login
enable_csrf: true
The code
$security->login($user, 'form_login');
Possible Solution
No response
Additional Context
No response