I have a Laravel 5.5 application I am able to login with API but unable to access routes with "auth:api" middleware.
Sending headers like
1 . Accept = application/json
2 . Authorization = Bearer eyJ0eXAi.....xxxxxxxx
In api.php
Route::group(['middleware' => ['auth:api'], 'prefix' => 'v1',], function(){
Route::get('me', 'Api\UserController@me');
}
This working on local but not on server.
Checked error_log file and laravel.log file. But no luck.
I am having the exact same error. Is there any resolution yet?
In terminal: run php artisan route:list
, if you see the 'web' middleware being applied to routes twice, remove the middleware from your group.
also You can see this in the ``` RouteServiceProvider
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community