PHPackages                             fts/oauth2 - 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. fts/oauth2

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

fts/oauth2
==========

laravel 5 oauth

v1.0.0(7y ago)014MITPHPPHP &gt;=5.4

Since Jul 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fts3232/oauth)[ Packagist](https://packagist.org/packages/fts/oauth2)[ RSS](/packages/fts-oauth2/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

oauth2
======

[](#oauth2)

[![Latest Stable Version](https://camo.githubusercontent.com/2b8240d88c567bbd106c8508b039673275b9a6cfc32a8844d1a961052bdea1cf/68747470733a2f2f706f7365722e707567782e6f72672f6674732f6f61757468322f762f737461626c65)](https://packagist.org/packages/fts/oauth2)[![Total Downloads](https://camo.githubusercontent.com/07de5fab473c7f253bf0871cf984f87cae11bde1ed8a96676b23c42b8ee2b353/68747470733a2f2f706f7365722e707567782e6f72672f6674732f6f61757468322f646f776e6c6f616473)](https://packagist.org/packages/fts/oauth2)[![License](https://camo.githubusercontent.com/580a43fdbf54e413eb9defd19d4745419e41e7be5b384373d220181bdb758206/68747470733a2f2f706f7365722e707567782e6f72672f6674732f6f61757468322f6c6963656e7365)](https://packagist.org/packages/fts/oauth2)

功能
==

[](#功能)

- oauth2.0授权

安装
==

[](#安装)

```
composer require fts/oauth

```

### 发布配置文件和公钥私钥

[](#发布配置文件和公钥私钥)

```
 php artisan vendor:publish

```

### 创建公钥和私钥

[](#创建公钥和私钥)

```
# private key
$ openssl genrsa -out privkey.pem 2048

# public key
$ openssl rsa -in privkey.pem -pubout -out pubkey.pem

```

### 添加服务提供者

[](#添加服务提供者)

打开 `config/app.php` 并添加以下内容到 providers 数组:

```
fts\OAuth2\OAuthServiceProvider.php::class

```

### 中间件

[](#中间件)

打开 `app/Http/Kernel.php` 并添加以下内容到 routeMiddleware 数组:

```
'oauth' => fts\OAuth2\Middleware\OAuth2::class

```

用法
==

[](#用法)

```
 Router::middleware('oauth')->get('');

```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2900d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14908395?v=4)[fts](/maintainers/fts3232)[@fts3232](https://github.com/fts3232)

---

Top Contributors

[![fts3232](https://avatars.githubusercontent.com/u/14908395?v=4)](https://github.com/fts3232 "fts3232 (5 commits)")

---

Tags

laraveloauth2

### Embed Badge

![Health badge](/badges/fts-oauth2/health.svg)

```
[![Health](https://phpackages.com/badges/fts-oauth2/health.svg)](https://phpackages.com/packages/fts-oauth2)
```

###  Alternatives

[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k181.3M2.2k](/packages/symfony-security-bundle)[symfony/security-http

Symfony Security Component - HTTP Integration

1.7k172.8M347](/packages/symfony-security-http)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9742.3M121](/packages/roots-acorn)[illuminate/session

The Illuminate Session package.

9938.5M821](/packages/illuminate-session)[bshaffer/oauth2-server-httpfoundation-bridge

A bridge to HttpFoundation for oauth2-server-php

512.3M12](/packages/bshaffer-oauth2-server-httpfoundation-bridge)

PHPackages © 2026

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