Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Security Bundle] Logging in programmatically broken after upgrade to 7.2 #59637

Copy link
Copy link
Closed
@Lorenzschaef

Description

@Lorenzschaef
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.