Back

Api auth middleware is not working on serve


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\[email protected]');
}

This working on local but not on server.

Checked error_log file and laravel.log file. But no luck.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us