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

ActivePackage

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 1mo 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 37% 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

2854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b248f8f7fb61ee4e9e2f661a993b603f679023ead09f3655cc8cfd6cfdfe6f4?d=identicon)[fts3232](/maintainers/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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M680](/packages/barryvdh-laravel-ide-helper)[laravel/lumen-framework

The Laravel Lumen Framework.

1.5k26.2M704](/packages/laravel-lumen-framework)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[silber/page-cache

Caches responses as static files on disk for lightning fast page loads.

1.3k441.9k6](/packages/silber-page-cache)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)[plank/laravel-mediable

A package for easily uploading and attaching media files to models with Laravel

8271.5M11](/packages/plank-laravel-mediable)

PHPackages © 2026

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