We have a web-app consuming a Laravel REST API back-end via Ang 1.6.5 front-end.
I'm looking to log 3 different authentication request outcomes: 1. Succesful authentication. 2. Valid user account, invalid password. 3. Invalid user account.
I can't seem to figure out how to go about hooking into Passport's auth process.
I've attempted with some custom Middleware, also a custom Provider. Neither worked, though it could have been the implementation.
What's the correct approach here?
Thanks.
Without re-writing the vendor source, you could look into After middleware, then just catch it before it returns. It's not the most elegant solution, but it might suffice.
Sorry this isn't a complete solution, I don't have enough points to leave a comment.