
jwt-auth
JSON Web Token authentication package for Laravel and Lumen PHP apps.
- Stars
- 11.5k
- Forks
- 1.5k
- Licence
- MIT
- Language
- PHP
- Last update
- 12 days ago
- Type
- Library
What it is
jwt-auth is a PHP package that adds JSON Web Token (JWT) login support to Laravel and Lumen applications. A JWT is a signed token a server gives a user after login, which the user sends back with later requests to prove who they are. The package is aimed at developers building APIs or apps that need token-based authentication in these PHP frameworks.
- Issue a JWT to a user after they log in to a Laravel API
- Protect API routes so only requests with a valid token are accepted
- Refresh or invalidate tokens as part of a login flow
Great for
- Laravel developers building token-based APIs
- Lumen developers who need JWT authentication
- Teams that want an MIT-licensed, Packagist-distributed auth package
- Developers who already know Laravel's authentication concepts
Not ideal for
- Non-PHP projects, since it only works with Laravel and Lumen
- Beginners with no Laravel experience, because setup assumes familiarity with the framework
- Projects needing a hosted login service rather than code in their own app
How to get it
- 1
Install with a package manager
You'll need: PHP · Composer · Laravel or Lumen project
Install the package with Composer
composer require tymon/jwt-auth - 2
Run it
- Install the package with Composer in your Laravel or Lumen project
- Follow the setup guide at jwt-auth.com to configure the package
- Add the authentication setup to your user model and routes as described in the docs
- Test a login request and confirm a token is returned
- 3
Get the most out of it
- Read the full documentation at jwt-auth.com for configuration options
- Review the package's test suite and badges to understand supported behavior
- Check the latest release notes for version 2.3.1 before upgrading
Downloads
Strengths
- Widely starred (11,485 stars) and MIT licensed
- Installed through Composer from Packagist, a standard PHP workflow
- Has documentation hosted at jwt-auth.com and automated tests shown in the README badges
Trade-offs
- The README is short and defers nearly all details to the external documentation site
- Limited to Laravel and Lumen
- Security issues must be reported by email rather than the issue tracker
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| jwt-auth (this) | 11.5k | Library | intermediate | 12 days ago | Laravel developers building token-based APIs |
| laravel-permission | 13k | Library | intermediate | 14 days ago | Laravel developers who need role-based access control in an app |
| Laravel-Excel | 12.7k | Library | intermediate | 14 days ago | Laravel developers who need to export database query results to Excel or CSV |
| framework | 35k | Framework | intermediate | 4 days ago | PHP developers building web applications or APIs |
| bagisto | 28.3k | App | intermediate | 4 days ago | Developers building a custom online store on Laravel |
| laravel-crm | 24.1k | App | intermediate | 4 days ago | Small and mid-sized businesses that want a self-hosted CRM |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.