Closed abolinhas closed 7 years ago
Double check the presence of JWT_SECRET
in the .env
file. Also, passing the token via the request like ?token=my-token
is not enabled by default.
Just did more tests, the problem is in the fact that the artisan jwt:generate
does not generate a token in the .env
file. It's probably something related to the main JWT Auth package.
Also, please open issues in a single place, not everywhere (ref. https://github.com/tymondesigns/jwt-auth/issues/1124).
Closing
I double check the .env file is configured correctly
Fix it, I don't now why but after generate a new app key the jwt auth starts work properly.
php artisan key:generate
Best regards
Hi, I'm building an api to authenticate my users through my mobile application The login controller return me the correct token.
Postman result
Now when I tried to get the current user by token I get the signature error User controller
I already try by pass the token by url domain.com/api/auth?token=token_key and by header Authorization Bearer token_key
Also I have the jwt secret inside config/jwt.php 'secret' => env('jwt_secret') and inside .env JWT_SECRET=jwt_secret
Any tip to help to solve this issue?
Thanks