PHPackages                             hashyoo/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. hashyoo/jwt-auth

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

hashyoo/jwt-auth
================

Json web token，登录认证（接口登录和web session登录），支持单社保和多设备登录，需要redis支持。目前仅适用于laravel

v1.1.6(5y ago)042MITPHPPHP &gt;=5.6.0

Since Jul 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hashyoo/jwt-auth)[ Packagist](https://packagist.org/packages/hashyoo/jwt-auth)[ RSS](/packages/hashyoo-jwt-auth/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (18)Used By (0)

jwt-auth 登录认证
=============

[](#jwt-auth-登录认证)

概述
--

[](#概述)

> Json web token，登录认证（接口登录和web session登录），支持单社保和多设备登录，需要redis支持。目前仅适用于laravel

兼容框架
----

[](#兼容框架)

目前仅支持laravel5.5+

用法
--

[](#用法)

> ### 1、引入composer
>
> [](#1引入composer)

```
composer require hashyoo/jwt-auth

```

> ### 2、添加config文件
>
> [](#2添加config文件)

```
php artisan vendor:publish --provider="HashyooJWTAuth\Providers\JWTAuthProvider"

```

config文件说明
----------

[](#config文件说明)

### 文件名

[](#文件名)

> hashyoo-jwt.php

### ttl 和 signin\_mode

[](#ttl-和-signin_mode)

> providers里的ttl和signin\_mode优先级要高于数组里一级ttl和signin\_mode

> signin\_mode：登录模式 se-单设备登录(Single equipment)只有最新的一个token可用， me-多设备登录(More equipment)，只要token不过期，都能使用

### pass\_key

[](#pass_key)

> providers里的pass\_key可以自定义设置，若不设置，则默认登录表里的密码字段是password

### 接口和web session

[](#接口和web-session)

> 接口形式：在guards里driver设置成api,在header里传递参数，参数名可自行在配置文件里token\_key自定义

> web session形式：在guards里driver设置成session

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~14 days

Recently: every ~45 days

Total

17

Last Release

1940d ago

Major Versions

v0.0.16 → v1.1.02020-09-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/1426f942d621addf279b853aca762f7321c8b66b2ce7f532b78adfd225224b31?d=identicon)[wu](/maintainers/wu)

---

Top Contributors

[![Simooonn](https://avatars.githubusercontent.com/u/24266163?v=4)](https://github.com/Simooonn "Simooonn (38 commits)")

---

Tags

phpjwtlaravel

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k6](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.0k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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