Tymon JWTAuth Providers LaravelServiceProvider not found (Solved)

If you are working with laravel jwt auth then may you face this error 'Tymon\JWTAuth\Providers\LaravelServiceProvider' not found. In this example, i will show you that how you can solve this error.

There is some problem while downloading the package with latest laravel version. So i am here to help you, that how to solve command "jwt:generate" is not defined. From this tutorial you will able to generate jwt secret key without error.

First un below command:

composer require tymon/jwt-auth:dev-develop --prefer-source


and in your config/app.php make providers as




Also provide the Aliases as:

'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,


After all the above steps publish our vendor:

php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"


And generate auth secret : php artisan jwt:secret


Read also: Laravel 8.x Rest API CRUD Example with JWT Auth


Hope it can help you.


Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js