79669440

Date: 2025-06-17 16:14:22
Score: 1
Natty:
Report link

You can't have both custom_authenticator and form_login_ldap active on the same firewall simultaneously. Symfony only uses one authenticator per request.

So Write a single custom authenticator that first tries LDAP logic and, if that fails, falls back to your custom logic (or vice versa).

Symfony’s new security system is designed for this: chain your logic inside the authenticator instead of in security.yaml.

Example:

This way, you control the flow and only register one authenticator in the firewall.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: gardener jeffon