Created
March 6, 2018 11:25
-
-
Save nitishakalwadi/a4565f813145bba467cca7deeaebdb6d to your computer and use it in GitHub Desktop.
Getting tymondesigns/jwt-auth to work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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