DEV Community

Discussion on: Build a JWT Authenticated API with Lumen(v5.8)

Collapse
 
ndiecodes profile image
Ndifreke Friday

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."

Thread Thread
 
dhavaldignizant profile image
dhaval-dignizant

now it's working. Thank you.

Thread Thread
 
ndiecodes profile image
Ndifreke Friday

You are welcome

Thread Thread
 
dhavaldignizant profile image
dhaval-dignizant

Hi Ndifreke,
can you explain how to publish jwt library also need to token expire time and refresh token. thank you in advance.

Thread Thread
 
ndiecodes profile image
Ndifreke Friday

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...

Thread Thread
 
dhavaldignizant profile image
dhaval-dignizant

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.