Situation
I'm using Laravel Passport API to communicate between Laravel and external "agents" via Personal Access Tokens: https://laravel.com/docs/5.5/passport#personal-access-tokens
You can create multiple tokens per user.
Authentication works and I can retrieve the User via Auth::User()
Question
How can I check which token is used?
Background
I want to use different tokens for different "agents" for the same user and I need to know which token is used to see who is connecting.
token
,user_id
andclient_id
in theoauth_access_tokens
table. Check out this discussion, too: laracasts.com/discuss/channels/laravel/passport-rest-makeauth – Kirill Simin