I am currently developping a REST API. I need to log all successfull connections in my database. To do that, I've tried to edit my AuthenticationSuccessHandler. But i don't know how to use the entity manager in it. I've read in forums to inject the entity manager in services but a developper didn't advise me that.
I would like to know the best way to resolve my problem.