PHPackages                             ngabor84/laravel-jwt-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ngabor84/laravel-jwt-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ngabor84/laravel-jwt-auth
=========================

JWT authentication middleware for the Laravel and Lumen framework

3.1.0(1y ago)03.7k2MITPHPPHP ^8.2CI failing

Since Nov 27Pushed 1y agoCompare

[ Source](https://github.com/ngabor84/laravel-jwt-auth)[ Packagist](https://packagist.org/packages/ngabor84/laravel-jwt-auth)[ Docs](https://github.com/ngabor84/laravel-jwt-auth)[ RSS](/packages/ngabor84-laravel-jwt-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (16)Used By (0)

[![GitHub license](https://camo.githubusercontent.com/b2971add94cdde908a314e6cfcbee598dcef4ffd15748b4ef9a4e404ee3fde80/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6761626f7238342f6c61726176656c2d6a77742d617574682e737667)](https://github.com/ngabor84/laravel-jwt-auth/blob/master/LICENSE)

JWT Auth Middleware
===================

[](#jwt-auth-middleware)

JWT authentication middleware for the Laravel and Lumen framework.

About
-----

[](#about)

This package allows you to authenticate the incoming requests with JWT authentication.

Installation
------------

[](#installation)

Require the ngabor84/laravel-jwt-auth package in your composer.json and update your dependencies:

```
composer require ngabor84/laravel-jwt-auth
```

Usage with Laravel
------------------

[](#usage-with-laravel)

Add the service provider to the providers array in the config/app.php config file as follows:

```
'providers' => [
    ...
    \Middleware\Auth\Jwt\Providers\LaravelServiceProvider::class,
]
```

Run the following command to publish the package config file:

```
php artisan vendor:publish --provider="Middleware\Auth\Jwt\Providers\LaravelServiceProvider"
```

You should now have a config/jwt.php file that allows you to configure the basics of this package.

Usage with Lumen
----------------

[](#usage-with-lumen)

Add the following snippet to the bootstrap/app.php file under the providers section as follows:

```
$app->register(\Middleware\Auth\Jwt\Providers\LumenServiceProvider::class);
...
$app->configure('jwt');
```

Create a config directory (if it's not exist), and create an jwt.php in it with the plugin configuration like this:

```
return [
    'secret' => env('JWT_SECRET'),
    'algo' => 'HS256',
    'expiration' => 10, // 10 minutes
    'decorateRequestWithTokenPayload' => false, // if it's true then after authentication the request will contain a tokenPayload attribute with the payload of the JWT token
];
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~152 days

Recently: every ~308 days

Total

15

Last Release

592d ago

Major Versions

0.7.0 → 1.0.02022-04-25

1.0.0 → 2.0.02022-04-26

2.0.0 → 3.0.02023-06-09

PHP version history (6 changes)0.1.0PHP &gt;=7.1

0.5.0PHP &gt;=7.3

0.7.0PHP ^7.3|^8.0

1.0.0PHP ^8.0

3.0.0PHP ^8.1

3.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b82b4c58ac85ec44874c61841493e3c6d7b46a1264c9902661b9d07eb638f292?d=identicon)[ngabor84](/maintainers/ngabor84)

---

Top Contributors

[![ngabor84](https://avatars.githubusercontent.com/u/22472700?v=4)](https://github.com/ngabor84 "ngabor84 (30 commits)")

---

Tags

jwtlaravelauthlumen

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ngabor84-laravel-jwt-auth/health.svg)

```
[![Health](https://phpackages.com/badges/ngabor84-laravel-jwt-auth/health.svg)](https://phpackages.com/packages/ngabor84-laravel-jwt-auth)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[generationtux/jwt-artisan

JWT auth package for Laravel and Lumen

13953.1k](/packages/generationtux-jwt-artisan)[benbjurstrom/cognito-jwt-guard

A laravel auth guard for JSON Web Tokens issued by Amazon AWS Cognito

1113.1k](/packages/benbjurstrom-cognito-jwt-guard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
