Closed puahyan closed 7 years ago
hi i just add in kernal.php,
protected $routeMiddleware = [
'auth.api' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
then it works, , but why other version do not need it ? or my solution is wrong ?
Hi @puahyan Thanks for the bug report I can confirm that there's an issue, I'll work on a fix and deploy Your fix didn't work for me, but the reason why this is required now is because dingo/api has been removed from the starter
Route::get('auth/user', function (Request $request) { return 'yo'; })->middleware('auth.api');
protected $routeMiddleware = [ 'auth.api' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
auth.api, not auth:api
yeah true, this is a way of fixing it
However auth:api
is supposed to use the api
config on the default auth
provider (check the config/auth.php)
I will try to solve the issue while keeping auth:api
if not then I will use your fix
Thanks!
Fixed 😄
hi, i face this error, may take a look thanks.
http://localhost:8000/api/auth/user --> display error