PHPackages                             plugins-world/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. plugins-world/laravel-jwt-auth

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

plugins-world/laravel-jwt-auth
==============================

LaravelJwtAuth plugin made by mouyong

001PHP

Since May 13Pushed 12mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

LaravelJwtAuth
==============

[](#laraveljwtauth)

[![Latest Stable Version](https://camo.githubusercontent.com/aa416e311d3c5f21c790cb4f464f99bef230094390f8ba1fa0bc2c3c0b68ff40/687474703a2f2f706f7365722e707567782e6f72672f706c7567696e732d776f726c642f6c61726176656c2d6a77742d617574682f76)](https://packagist.org/packages/plugins-world/laravel-jwt-auth)[![Total Downloads](https://camo.githubusercontent.com/e253ee13fe7bf3e48695deae136285de99c4145f70a0126a562809c8d4fa56a8/687474703a2f2f706f7365722e707567782e6f72672f706c7567696e732d776f726c642f6c61726176656c2d6a77742d617574682f646f776e6c6f616473)](https://packagist.org/packages/plugins-world/laravel-jwt-auth)[![Latest Unstable Version](https://camo.githubusercontent.com/8b1bcbb39ed97b97eab05aabefa18e419e1e384d3f8eb8c672224699d8e5e472/687474703a2f2f706f7365722e707567782e6f72672f706c7567696e732d776f726c642f6c61726176656c2d6a77742d617574682f762f756e737461626c65)](https://packagist.org/packages/plugins-world/laravel-jwt-auth) [![License](https://camo.githubusercontent.com/8883fdf750c13a5681db0ee1916b7e2591535521539273fc6d5fc068830994d7/687474703a2f2f706f7365722e707567782e6f72672f706c7567696e732d776f726c642f6c61726176656c2d6a77742d617574682f6c6963656e7365)](https://packagist.org/packages/plugins-world/laravel-jwt-auth)[![PHP Version Require](https://camo.githubusercontent.com/d8b1adf2b8450454090068942ae86157e598e4b7231195c37da827478bec2df4/687474703a2f2f706f7365722e707567782e6f72672f706c7567696e732d776f726c642f6c61726176656c2d6a77742d617574682f726571756972652f706870)](https://packagist.org/packages/plugins-world/laravel-jwt-auth)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

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

[](#installation)

You can install the package via composer:

```
php artisan market:require plugins-world/laravel-jwt-auth

composer require plugins-world/laravel-jwt-auth
```

Usage
-----

[](#usage)

单独使用登录功能时，请在 `auth()->login()` 时使用 Plugins\\LaravelJwtAuth\\Models\\User，示例如下：

```
use Plugins\LaravelJwtAuth\Models\User as JwtModelUser;

$inputPassword = \request('password');

$user = \App\Models\User::first();
if (Hash::check($user->password, $inputPassword)) {
    // get_class($user) !== config('auth.providers.api.model') 配置的模型时，
    // 需要将 $user 转换成配置的模型。后续验证才能通过登录验证。
    $token = auth('api')->login(new JwtModelUser($user->toArray()));
}
```

### Testing

[](#testing)

```
composer test
```

### How to create this package

[](#how-to-create-this-package)

`php artisan new LaravelJwtAuth`

Please see [plugin-manager](https://github.com/plugins-world/plugin-manager) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![mouyong](https://avatars.githubusercontent.com/u/10336437?v=4)](https://github.com/mouyong "mouyong (1 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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