Solutions form other topics did not help me, so I created new ask.
Each time when I want to poke(GET) my protected route with header with token I get: "Token Signature could not be verified in BaseMiddleware.php" . Also my generated tokens don't match at jwt.io
I have the same 'secret' in
as JWT_SECRET in jwt.php
.env
I've tried to
and php artisan key:generate
php artisan jwt:secret
I have custom claims in User model:
public function getJWTCustomClaims()
{
return ['firstname' => $this->firstname,
'lastname' => $this->lastname,
'email' => $this->email];
}
I use
middleware to protect route. Tymon\JWTAuth\Http\Middleware\Authenticate
:
api.php
Route::middleware('jwt.auth')->get('users','UsersController@getAllUsers');
is added into 'jwt.auth'
. Kernel.php
I just stucked at the begining. My repo is bmbBAMBUS/vetpet at git, it's public since it's just begining.
Composer version 1.5.2
PHP 7.1.10
"tymon/jwt-auth": "1.0.0-rc.1"