Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nitishakalwadi/a4565f813145bba467cca7deeaebdb6d to your computer and use it in GitHub Desktop.
Save nitishakalwadi/a4565f813145bba467cca7deeaebdb6d to your computer and use it in GitHub Desktop.
Getting tymondesigns/jwt-auth to work
https://github.com/tymondesigns/jwt-auth
Add library to composer.json:
"require": {
...
"tymon/jwt-auth": "1.0.0-beta.3"
...
},
Run this command in console:
composer update
Add provider in config/app.php:
'providers' => [
...
Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
...
],
Add aliases in the same file `config/app.php':
'aliases' => [
...
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
...
],
And then run command in console:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
next run:
php artisan jwt:secret
And you can configure JWTAuth in next steps in:
https://github.com/tymondesigns/jwt-auth/wiki/Configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment