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

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

tinymeng/oauth
==============

wechat sina qq alipay twitter google line facebook oauth

v2.3.5(11mo ago)7845117[1 issues](https://github.com/majiameng/OAuth2/issues)MITPHPPHP &gt;=7.0CI failing

Since Dec 20Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/majiameng/OAuth2)[ Packagist](https://packagist.org/packages/tinymeng/oauth)[ RSS](/packages/tinymeng-oauth/feed)WikiDiscussions master Synced 6d ago

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

tinymeng/oauth
==============

[](#tinymengoauth)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/977cb197bbc7f018a90f209975f6e0974afbf5344b6f88270fb55bd3780c3e65/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616a69616d656e672f4f41757468322f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/majiameng/OAuth2/?branch=master)[![Build Status](https://camo.githubusercontent.com/00c5f265755f64d1930f275fb2ffdf70cf82534e5ccb7bd1655290a9a16e02a2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616a69616d656e672f4f41757468322f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/majiameng/OAuth2/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/b72052e4928a956b0d53e1b27bc39a20b6e4c7591d42b052260bead967fb8d62/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6f617574682f762f737461626c65)](https://packagist.org/packages/tinymeng/oauth)[![Total Downloads](https://camo.githubusercontent.com/7a6cd1073c68663aca62d977659dbf88c744e22da9f8e8eb3ac21de6fe38fc3f/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6f617574682f646f776e6c6f616473)](https://github.com/majiameng/OAuth2/tags)[![Latest Unstable Version](https://camo.githubusercontent.com/d6911a61a8c446e47882de600dc6eeb034591f4a010b3ed7bb716b2e0559728f/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6f617574682f762f756e737461626c65)](https://packagist.org/packages/tinymeng/oauth)[![License](https://camo.githubusercontent.com/99cca5b910790595e38b45db013814ea83b893103973816506b18226251ff187/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6f617574682f6c6963656e7365)](https://github.com/majiameng/OAuth2/blob/master/LICENSE)

After developing multiple QQ and WeChat logins, it is natural to develop an aversion. Inertia has returned and I want to search for relevant wheels online, but I have never found a one that I feel satisfied with. Either it is too difficult to understand when using, or the file structure is too messy, so I have to roll up my sleeves and do it myself.

**！！Please familiarize yourself with the Oauth/QQ/WeChat documentation first!! Please have basic debugging skills ！！**

Welcome Star, welcome PR ！

> If you have any questions to communicate, please post them here ： [OAuth2](https://github.com/majiameng/OAuth2/issues/1) exchange Or Send an email

Integrating many third party login interfaces, including qq-login、wx-login、sina-login、github-login、alipay-login、aliyum-login、douyin-login and so on

集成了许多第三方登录界面，包括QQ登录、微信登录、新浪登录、github登录、支付宝登录、百度登录、抖音登录、GitLab、Naver、Line、codeing、csdn、gitee等，陆续增加ing

Documentation
=============

[](#documentation)

You can find the tinymeng/oauth documentation on the website. Check out the Getting Started page for a quick overview.
----------------------------------------------------------------------------------------------------------------------

[](#you-can-find-the-tinymengoauth-documentation-on-the-website-check-out-the-getting-started-page-for-a-quick-overview)

- [Wiki Home](https://github.com/majiameng/OAuth2/wiki)
- [Getting Started](https://github.com/majiameng/OAuth2/wiki/Getting-Started)
- [Installation](https://github.com/majiameng/OAuth2/wiki/Installation)
- [Configuration](https://github.com/majiameng/OAuth2/blob/master/example/config/params.php)
- [Contributing Guide](https://github.com/majiameng/OAuth2/wiki/Contributing-Guide)
- [Update log](https://github.com/majiameng/OAuth2/wiki/Update-log)
- [Complete demo example](https://github.com/majiameng/OAuth2/wiki/demo)
- [中文文档](https://github.com/majiameng/OAuth2/wiki/zh-cn-Home)

General third-party login instructions document
-----------------------------------------------

[](#general-third-party-login-instructions-document)

### Domestic Platforms

[](#domestic-platforms)

GatewaysLogin NameLogin MethodqqTencent QQPC Scan Code, APPwechatWeChatPC, Official Account, Mini Program, APPwecomWeComPC, APPsinaSina WeiboPC, APPalipayAlipayPC, APPaliyunAlibaba CloudPCbaiduBaiduPCdouyinDouyinPC, APPtoutiaoToutiaoPC, APPxiguaXigua VideoPC, APPdingtalkDingTalkPC, APPxiaomiXiaomiPC, APPhuaweiHuaweiPC, APP### Development Platforms

[](#development-platforms)

GatewaysLogin NameLogin MethodgithubGitHubPCgitlabGitLabPCgiteeGiteePCcodingCodingPCoschinaOSChinaPCcsdnCSDNPC### International Platforms

[](#international-platforms)

GatewaysLogin NameLogin MethodgoogleGooglePCfacebookFacebookPCtwitterTwitterPClineLinePCnaverNaverPCamazonAmazonPCappleApplePC, APPyahooYahooPCmicrosoftMicrosoftPC> Notes:
>
> 1. International platforms like Google, Facebook, and Twitter require overseas or Hong Kong servers for successful callback
> 2. Some platforms support multiple authorization methods, such as PC web authorization and APP authorization
> 3. Please read the corresponding platform's development documentation and complete developer qualification certification before use

### Installation

[](#installation)

```
composer require tinymeng/oauth:^2.0.0 -vvv

```

> The namespace used by the class library is `\\tinymeng\\oauth`

### 目录结构

[](#目录结构)

```
.
├── example                         示例代码目录
│   ├── config                      配置示例
│   │   └── params.php              参数配置示例
│   ├── oauth2.php                  OAuth2 使用示例
│   ├── demo                        OAuth2 使用demo带html 示例
│   ├── proxy                       代理相关示例
│   │   └── wx_proxy.php            微信多域名代理 PHP 版本
│   └── weixin-authorize-proxy.html 微信多域名代理 HTML 版本(推荐)
├── src                             源代码目录
│   ├── Connector                   连接器基类目录
│   │   ├── Gateway.php             必须继承的抽象基类
│   │   └── GatewayInterface.php    必须实现的接口
│   ├── Exception                   异常处理目录
│   │   └── OAuthException.php      OAuth 异常类
│   ├── Gateways                    各平台授权实现目录
│   │   ├── Alipay.php              支付宝授权
│   │   ├── Aliyun.php              阿里云授权
│   │   ├── Baidu.php               百度授权
│   │   ├── Coding.php              Coding 授权
│   │   ├── Csdn.php                CSDN 授权
│   │   ├── Douyin.php              抖音授权
│   │   ├── Facebook.php            Facebook 授权
│   │   ├── Gitee.php               Gitee 授权
│   │   ├── Github.php              GitHub 授权
│   │   ├── Gitlab.php              GitLab 授权
│   │   ├── Google.php              Google 授权
│   │   ├── Line.php                Line 授权
│   │   ├── Naver.php               Naver 授权
│   │   ├── Oschina.php             OSChina 授权
│   │   ├── Qq.php                  QQ 授权
│   │   ├── Sina.php                新浪微博授权
│   │   ├── Twitter.php             Twitter 授权
│   │   └── Wechat.php              微信授权
│   ├── Helper                      辅助类目录
│   │   ├── ConstCode.php           公共常量定义
│   │   └── Str.php                 字符串辅助类
│   └── OAuth.php                   OAuth 工厂类
├── tests                           测试目录
│   └── OAuthTest.php               OAuth 测试类
├── composer.json                   Composer 配置文件
├── LICENSE                         MIT 开源协议
└── README.md                       说明文档

```

Contributors
------------

[](#contributors)

Thanks for your contribution to the project!

[![Contributors Count](https://camo.githubusercontent.com/0bf6075070efa69b40987988c320d3018cfa7871f276f02ca27191f99b588856/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732d616e6f6e2f6d616a69616d656e672f4f41757468323f7374796c653d666f722d7468652d6261646765266c6f676f3d7661756c7477617264656e26636f6c6f723d303035414134)](https://github.com/majiameng/OAuth2/graphs/contributors)
[![Contributors Avatars](https://camo.githubusercontent.com/5d1640db179951f2f372a060383ad92b9bc0dd78e61c314c17b91b024dbfaf5b/68747470733a2f2f636f6e7472696275746f72732d696d672e7765622e6170702f696d6167653f7265706f3d6d616a69616d656e672f4f4175746832)](https://github.com/majiameng/OAuth2/graphs/contributors)

Star History
------------

[](#star-history)

[![Star History Chart](https://camo.githubusercontent.com/5c841fddeb7239de67bfa54f493455f899924efaa1d89feff632573f592b9e08/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d6d616a69616d656e672f4f417574683226747970653d44617465)](https://www.star-history.com/#majiameng/OAuth2&Date)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance52

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 97.8% 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 ~335 days

Recently: every ~392 days

Total

8

Last Release

354d ago

Major Versions

v1.0.0 → v2.0.02020-08-08

v1.0.x-dev → v2.1.02022-05-12

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v2.1.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f00d0a29ab429fef8e40769a695213a7adcaff7cb9ba6dc1eb77e0d9655e0618?d=identicon)[tinymeng](/maintainers/tinymeng)

---

Top Contributors

[![majiameng](https://avatars.githubusercontent.com/u/24783993?v=4)](https://github.com/majiameng "majiameng (87 commits)")[![whmcsaddon](https://avatars.githubusercontent.com/u/5402829?v=4)](https://github.com/whmcsaddon "whmcsaddon (1 commits)")[![yejiuxing](https://avatars.githubusercontent.com/u/50610242?v=4)](https://github.com/yejiuxing "yejiuxing (1 commits)")

---

Tags

aliyunfacebookgiteegithubloginoauthoauth2qqsinatwitterwechatphplogintinymengQQ LoginSina Logingithub loginoauth-loginwx-loginalipay-login

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hardywen/social-login

Use QQ or Sina Weibo login

111.9k](/packages/hardywen-social-login)

PHPackages © 2026

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