jwt-auth
jwt-auth copied to clipboard
Listening for Auth events
How about event listening in JWT-Auth guard? I need to listen for attemp, auttenticated and others jwt auth events like this https://laravel.com/docs/5.3/authentication#events
Using jwt-auth package I can't listen for theses events. Help?
I have same problem. can you find any solution ?
The solution I've come up with (I'm not a fan of doing it this way though) is fire the events in the auth controller on the different stages of auth (attempt, login success, logout). but jwt-auth really should fire events.
Any official JWT Event? still need a built in solution
+++
Same here. I was just looking at setting up authentication logging but putting it directly through the controllers isn't ideal 👎
Same here. Ended up doing it manually event(new Illuminate\Auth\Events\Logout($user));
same issue...maybe we are missing function for handle it
+++
event(new \Illuminate\Auth\Events\Login('api', Auth(‘api’)->user(), false));
I triggered it manually. I can't get the current guard. I can only write it dead
+++
event(new \Illuminate\Auth\Events\Login('api', Auth(‘api’)->user(), false));
I triggered it manually. I can't get the current guard. I can only write it dead
For now am using this, until PR to fire events is merged by @tymondesigns
event(new \Illuminate\Auth\Events\Login('api', Auth(‘api’)->user(), false));
I triggered it manually. I can't get the current guard. I can only write it dead
For now am using this, until PR to fire events is merged by @tymondesigns
I think it will never be merged... Project is literally dead. Better look to forks like https://github.com/PHP-Open-Source-Saver/jwt-auth and try to create PR there
Happy to inform you, that and many other issues are now resolved in this fork: https://github.com/PHP-Open-Source-Saver/jwt-auth