anyx/LoginGateBundle

Incrementing and clearing counters should not use authentication handlers

Closed this issue · 2 comments

stof commented

When using handlers, you are responsible for deciding what the Response should be after the success and the failure. and your bundle provide a very naive implementation, which is not the implementation shipped in Symfony by default. This means that enabling the bundle break things.

Given that incrementing and clearing counters is totally independent from the action taken after the authentication, you should use the authentication events instead.

anyx commented

Hi @stof
Today i made refactoring of this bundle.
Not sure that current implementation can be useful for someone, but if issue was opened, I tried to make bundle better (or installable at least).

If you have some advises for making implementation less naive, i will be glad to hear them.

Thanks

This bundle is a bit confusing but after all it is using the events as @stof said. Just don't follow the readme 😄 . Use the listener and register without extending anything special class from symfony and deal with those events. This should probably become a warning.