I\'m trying to test the authentication with Laravel\'s Passport and there\'s no way... always received a 401 of that client is invalid, I\'ll leave you what I\'ve tried:
Laravel Passport actually ships with some testing helpers which you can use to test your authenticated API endpoints.
Passport::actingAs( factory(User::class)->create(), );