Reputation: 10886
I've setup JwtAuth in Laravel 5.2. When I use the jwt.auth
middleware like this:
$api->group(['prefix' => 'v1', 'middleware' => 'jwt.auth'], function($api)
{
$controllerPath = 'App\Http\Controllers\api\v1\\';
$api->resource('user', 'App\Http\Controllers\api\v1\userController');
$api->post('/authuser','App\Http\Controllers\api\v1\userController@authUser');
});
The user is found and I receive his/her information.
But when I use the jwt.refresh
middleware I receive the error that the user is not found:
Trying to get property of non-object
How is this possible, I've this problem for quit some time now. Could someone please give me a solution?
Upvotes: 0
Views: 1269
Reputation: 2609
If you want a manual fix. In jwt.php file just set the blacklist functionality to false. And it should work fine.
You are facing this issue i guess.
https://github.com/tymondesigns/jwt-auth/issues/83
Author has updated the package to get rid of the error. As the problem is that the new token too gets blacklisted on refresh.
Upvotes: 1