I'd like to test the authentication of JWTs in my project as the JWTs will be sent from outside the app, and so they must be signed using the key from my application. Is this possible? Does anyone know of a site that allows you to sign a token using a secret?
I tried http://jwtbuilder.jamiekurtz.com/ but JWT-auth keeps returning {"error":"token_invalid"}
if I enter the key which was returned by jwt:generate
. This leads me to believe the key returned by this command is not actually the key used to sign JWTs in my application.
I'm using php artisan jwt:generate
to generate a key, which returns the following:
jwt-auth secret [...] set successfully.
But where is it set? The JWT_SECRET
variable in my .ENV file doesn't change, and if I perform a project wide search for the key it's not found.
Does this command work?
Laravel 5.3, jwt-auth 0.5.9.