0
I have an API in Laravel and in it, I need to authenticate the access requests. So, I used Passport Laravel, only according to the return of the API, there is some definition that I did not inform in my code.
On my route, I inform the middleware guy:
Route::get('/members', 'PessoaController@index')->middleware('auth:api');
In config/app.php I informed the class
Laravel\Passport\PassportServiceProvider::class,
Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
But when I make any request on my API, I get the following feedback:
(1/1) Fatalthrowableerror Type error: Argument 1 passed to Laravel Passport Http Middleware Createfreshapitoken::__Construct() must be an instance of Laravel Passport Apitokencookiefactory, instance of Illuminate Foundation Application Given, called in /home/secbase.com.br/vendor/Laravel/framework/src/Illuminate/Foundation/Providerrepository.php on line 208
You can add the http Past middleware class in your question?
– Mauricio Wanderley Martins