PHPackages                             easyswoole/o-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. [Framework](/categories/framework)
4. /
5. easyswoole/o-auth

ActiveLibrary[Framework](/categories/framework)

easyswoole/o-auth
=================

easyswoole component

1.0.2(5y ago)32.3k↑60.7%3Apache-2.0PHPPHP &gt;=7.1.0

Since Jun 23Pushed 5y agoCompare

[ Source](https://github.com/easy-swoole/o-auth)[ Packagist](https://packagist.org/packages/easyswoole/o-auth)[ Docs](https://www.easyswoole.com/)[ RSS](/packages/easyswoole-o-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

o-auth
======

[](#o-auth)

介绍
--

[](#介绍)

基于`easyswoole/http-client`对第三方登录授权的SDK。

安装
--

[](#安装)

```
composer require easyswoole/o-auth

```

代码
--

[](#代码)

公共的方法：

- `getAuthUrl()` 获取授权地址
- `getAccessToken($storeState = null, $state = null, $code = null)` 获取AccessToken（只返回access\_token）
- `getAccessTokenResult()` 执行`getAccessToken`方法后，此方法获取原结果
- `getUserInfo(string $accessToken)` 获取用户信息
- `validateAccessToken(string $accessToken)` 验证token是否有效
- `refreshToken(string $refreshToken = null)` 刷新token 返回`bool`
- `getRefreshTokenResult()` 执行`refreshToken`方法后，此方法获取原结果

示例代码
----

[](#示例代码)

[微信](./examples/WeiXin.php)

[QQ](./examples/QQ.php)

[微博](./examples/Weibo.php)

[支付宝](./examples/AliPay.php)

[Github](./examples/Github.php)

[Gitee](./examples/Gitee.php)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.9% 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 ~100 days

Total

3

Last Release

1947d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45c234d5f129ea570e630425636299127647534f0c2cbb073555e2c45d403d6f?d=identicon)[kiss291323003](/maintainers/kiss291323003)

---

Top Contributors

[![Player626](https://avatars.githubusercontent.com/u/44792981?v=4)](https://github.com/Player626 "Player626 (26 commits)")[![kiss291323003](https://avatars.githubusercontent.com/u/24490609?v=4)](https://github.com/kiss291323003 "kiss291323003 (5 commits)")

---

Tags

asyncframeworkswooleeasyswoole

### Embed Badge

![Health badge](/badges/easyswoole-o-auth/health.svg)

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

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

4.8k186.9k50](/packages/easyswoole-easyswoole)[easyswoole/mysqli

An efficient swoole framework

34120.5k27](/packages/easyswoole-mysqli)[easyswoole/redis

easyswoole component

3391.8k12](/packages/easyswoole-redis)[easyswoole/orm

php stander lib

3088.7k17](/packages/easyswoole-orm)[easyswoole/compiler

easyswoole component

691.1k](/packages/easyswoole-compiler)[easyswoole/fast-cache

An efficient swoole framework

1030.3k2](/packages/easyswoole-fast-cache)

PHPackages © 2026

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