Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] Security::login does not take into account custom user_checker #57706

Open
oleg-andreyev opened this issue Jul 11, 2024 · 3 comments

Comments

@oleg-andreyev
Copy link
Contributor

Symfony version(s) affected

6.4.3

Description

We have custom user_checker for main firewall and we have automatically called Security::login which does not take into account customuser_checker and calling InMemoryUserChecker

How to reproduce

security.yaml

    main:
      lazy: true
      provider: app_user_provider
      user_checker: App\User\UserChecker

after that just call Security::login() and UserChecker won't be called.

Possible Solution

since already fetch getFirewallConfig we need to fetch userChecker and fetch it from container.

Additional Context

No response

@MatTheCat
Copy link
Contributor

Is that related to #54287?

@oleg-andreyev
Copy link
Contributor Author

@MatTheCat looks like something similar - yes.

As workaround for now:

    security.user_checker:
        class: App\User\UserChecker

@xabbuh
Copy link
Member

xabbuh commented Jul 17, 2024

Can you check if #57748 would fix the issue for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants