The above command publishes the JWTAuth Package. Here's this thing, the vendor:publish command is not available in lumen.
You can try using third party packages to pull this in ( github.com/laravelista/lumen-vendo... )
Add the following snippet to the bootstrap/app.php file under the providers section as follows:
// Uncomment this line
$app->register(App\Providers\AuthServiceProvider::class);
// Add this line
$app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
getting this error after install jwt
php artisan jwt:secret
There are no commands defined in the "jwt" namespace.
Please check to make sure
tymon/jwt-auth
installed successfullyAlso type
php artisan
to see available commands.Keep me posted on your progress.
Side note: the command
jwt:secret
updates your .env file with something like JWT_SECRET=secretkeystring."It is the key that will be used to sign your tokens. How that happens exactly will depend on the algorithm that you choose to use."
now it's working. Thank you.
You are welcome
Hi Ndifreke,
can you explain how to publish jwt library also need to token expire time and refresh token. thank you in advance.
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
The above command publishes the JWTAuth Package. Here's this thing, the
vendor:publish
command is not available in lumen.You can try using third party packages to pull this in ( github.com/laravelista/lumen-vendo... )
For managing expiration time and refreshing tokens, this link should help out; jwt-auth.readthedocs.io/en/develop...
Hi Ndifreke,
Thanks for reply. one more thing I need if you help me. you have any example for lumen with vue also include in jwt token use.
Had the same issue.
following the docs here jwt-auth.readthedocs.io/en/develop...
especially the chapter Bootstrap file changes fixed the issue
Add the following snippet to the
bootstrap/app.php
file under the providers section as follows: