luklaw's avatar

How to functional test application using Laravel Passport?

I'm building an api using for authorization Laravel Passport package and I would like to functional test my routes, problem is that I have used client_credentials grant type and recommended code to test api is not working.

Passport::actingAs(
    factory(User::class)->create(),
    ['create-servers']
);

How to create in test environment access token and use it to access my resources?

Currently im getting "unauthorized" response.

0 likes
2 replies

Please or to participate in this conversation.