PHPackages                             fyflzjz/oauth - 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. fyflzjz/oauth

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

fyflzjz/oauth
=============

微信、QQ网页端第三方登录

v0.0.2(7y ago)118MITPHPPHP &gt;=5.6

Since Nov 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fyflzjz/oauth)[ Packagist](https://packagist.org/packages/fyflzjz/oauth)[ Docs](https://github.com/fyflzjz/oauth)[ RSS](/packages/fyflzjz-oauth/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

> ## 微信、QQ网页端第三方登录
>
> [](#微信qq网页端第三方登录)

```
还在调试中哦

```

> ### 安装
>
> [](#安装)

```
composer require fyflzjz/oauth

```

> ### 使用示例
>
> [](#使用示例)

- QQ第三方登录

```
$config = [
    'app_id'   => '123456',
    'app_key'  => '132456',
    'callback' => 'http://expmple.com/oauth/callback.php',
];

$qcConect = new \app\common\oauth\QqConect($config);
//调用qqLogin方法会自动跳转到QQ授权登录页面
$qcConect->qqLogin();

```

- 微信第三方登录

```
$config = [
    'app_id'     => '1234',
    'app_secret' => '1',
    'callback' => 'http://expmple.com/oauth/callback.php',
];

$wxWeb = new \app\common\oauth\WxWeb($config);
//调用wxLogin方法会自动跳转到微信授权登录页面
$wxWeb->wxLogin();

```

- qq第三方登录回调

```
$config = [
    'app_id'   => '123456',
    'app_key'  => '132456',
    'callback' => 'http://example.com/oauth/callback.php',
];

$qcConect = new \app\common\oauth\QqConect($config);

/*
* 存储 callback 数据
* 在 access_token 有效期内(expires_in)可直接使用存储的callback数据
* 在 access_token 失效前可通过 $qcConect->refreshAccessToken() 方法刷新 access_token
*/
$callback = $qcConect->qqCallback();
$access_token = $callback['access_token'];
$openid = $qcConect->getOpenid();

//获取用户信息
$user_info = $qcConect->getUserInfo($access_token, $openid);

```

- 微信第三方登录回调

```
$code = empty($_GET['code']) ? '' : $_GET['code'];

$config = [
    'app_id'     => '1234',
    'app_secret' => '1',
    'callback'   => 'http://exmple.com/example/oauth/callback.php',
];

$wxWeb = new \app\common\oauth\WxWeb($config, $code, 'h5');

/*
* 存储 token_info 数据
* 在 access_token 有效期内(expires_in)可直接使用存储的 token_info 数据
* 在 access_token 失效前可通过 $wxWeb->refreshAccessToken() 方法刷新 access_token
*/
$token_info = $wxWeb->InitToken();

$access_token = $token_info['access_token'];
$open_id = $token_info['openid'];

//获取用户信息
$user_info = $wxWeb->getUserInfo($access_token, $open_id);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

2735d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22771b07f672e6ce74d536a4290d01e8288163be5d008c3caf93545e85356fb6?d=identicon)[ferminfu](/maintainers/ferminfu)

---

Top Contributors

[![ferminfeng](https://avatars.githubusercontent.com/u/14138713?v=4)](https://github.com/ferminfeng "ferminfeng (8 commits)")

---

Tags

oauthwechatweixinqq

### Embed Badge

![Health badge](/badges/fyflzjz-oauth/health.svg)

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

###  Alternatives

[overtrue/socialite

A collection of OAuth 2 packages.

1.4k5.5M87](/packages/overtrue-socialite)[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[henter/wechat-oauth

WeChat OAuth SDK

3443.2k2](/packages/henter-wechat-oauth)[oakhope/oauth2-wechat

微信登录认证授权 Wechat login authorization. This package provides Wechat OAuth 2.0 support for the PHP League's OAuth 2.0 Client

228.9k](/packages/oakhope-oauth2-wechat)

PHPackages © 2026

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