Skip to content

Conversation

@smoench
Copy link
Contributor

@smoench smoench commented Oct 21, 2020

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

The Symfony\Security\Authentication\AuthenticatorManager:L290 dispatches Symfony\Component\Security\Http\SecurityEvents::INTERACTIVE_LOGIN but it is not allowed for bubbling.

@smoench smoench changed the base branch from 5.x to 5.1 October 21, 2020 14:13
@xabbuh xabbuh added this to the 5.1 milestone Oct 21, 2020
@smoench
Copy link
Contributor Author

smoench commented Oct 22, 2020

Travis failures seems unrelated to this changes.

@wouterj
Copy link
Member

wouterj commented Oct 22, 2020

Hi @smoench! I'm interested to know how you use this interactive login event and why you don't use one of the new login events.

While writing the new system, we discussed the interactive event and found out that it was very inconsistent (and almost to the point of becoming unusable): #33558 (comment) That's why I intentionally left it out and only dispatched it for legacy reasons. My idea was to deprecate this event in 5.3/5.4 (whenever we remove the experimental state from the new system). However, it would be interesting to see if that would result in missing functionality.

@smoench
Copy link
Contributor Author

smoench commented Oct 22, 2020

Hi @wouterj!

I was migrating from a Guard-Authenticator to the new approach. One of my tests has failed because there is a Listener listens on Symfony\Component\Security\Http\SecurityEvents::INTERACTIVE_LOGIN. As the documentation says no word about how to act on interactive logins I was debugging the code. Then I was wondering why the AuthenticatorManager dispatches the interactive login event but my listener doesn't get called. I thought this might be a bug and I provided this PR.

Meanwhile I could migrate my listener to the new LoginSuccessEvent. Thanks!

IHMO the dispatch of Symfony\Component\Security\Http\SecurityEvents::INTERACTIVE_LOGIN could be safely removed as the event is not allowed for bubbling and listeners could only be added via a compiler pass to the firewalls event dispatcher.

@smoench smoench closed this Oct 22, 2020
@smoench smoench deleted the 51-security-authenticator-interactive-login branch February 18, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants