Hi, using Symfony 2.8 with MongoDB I can't manage to trigger the listener, the response always stays the same (the token) when I do a POST through /login.
The die() doesn't work.
Thanks for your help.
After hours of research... I finally found the problem, it was missing an UserInterface in the AuthenticationSucessListener (which is highlighted in the screen), the worst part of it is... it kept sending the token like no problem and there wasn't any error message about it !
it kept sending the token like no problem and there wasn't any error message about it !
Yeah, since you're calling return in your listener, the event lifecycle just continue and our AuthenticationSuccessHandler returns the original response containing the original data, as it is already set before your listener intercept the event.
Unfortunately, event listeners may be painful to debug...
Yeah, thanks to your sandbox and the listener in it I managed to find the problem =)
Most helpful comment
After hours of research... I finally found the problem, it was missing an UserInterface in the AuthenticationSucessListener (which is highlighted in the screen), the worst part of it is... it kept sending the token like no problem and there wasn't any error message about it !
