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

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

spoonwep/oauth2-qq
==================

QQ OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.3.9(4y ago)81192MITPHPPHP &gt;=5.4.0

Since Jan 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/spoonwep/oauth2-qq)[ Packagist](https://packagist.org/packages/spoonwep/oauth2-qq)[ RSS](/packages/spoonwep-oauth2-qq/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (13)Used By (0)

oauth2-qq
=========

[](#oauth2-qq)

QQ OAuth 2.0 support for the PHP League's OAuth 2.0 Client

Install
-------

[](#install)

You can open a terminal and type in

```
composer require spoonwep/oauth2-qq
```

or require in a composer.json

```
"require": {
	"spoonwep/oauth2-qq": "~1.3"
}
```

then run:

```
composer update
```

Useage
------

[](#useage)

```
session_start();
$provider = new \Spoonwep\OAuth2\Client\Provider\Qq([
	'clientId' => '{QQ APP ID}',
	'clientSecret' => '{QQ APP KEY}',
	'redirectUri' => 'http://example.com/callback-url',
]);
if (!isset($_GET['code'])) {
	$authUrl = $provider->getAuthorizationUrl();
	$_SESSION['oauth2state'] = $provider->getState();
	header('Location: '.$authUrl);
	exit;
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
	unset($_SESSION['oauth2state']);
	exit('Invalid state');
} else {
	$token = $provider->getAccessToken('authorization_code', [
		'code' => $_GET['code']
	]);

	//fetch userinfo returned by serverside
    $user = $provider->getResourceOwner($token);
    $user = $user->toArray();
    print_r($user);

    //get user's unique openid from serverside
    $openid = $provider->openid;
    printf('User\'s openid:%s', $openid);
}
```

### License

[](#license)

The MIT License (MIT). Please see [License](https://github.com/spoonwep/oauth2-qq/blob/master/LICENSE.txt) File for more information.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~405 days

Total

12

Last Release

1551d ago

### Community

Maintainers

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

---

Top Contributors

[![spoonwep](https://avatars.githubusercontent.com/u/4607506?v=4)](https://github.com/spoonwep "spoonwep (22 commits)")

---

Tags

clientoauthoauth2authorizationauthorisationqq

### Embed Badge

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

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

###  Alternatives

[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2276.2M36](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1152.7M11](/packages/patrickbussmann-oauth2-apple)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36761.9k15](/packages/omines-oauth2-gitlab)[league/oauth2-instagram

Instagram OAuth 2.0 Client Provider for The PHP League OAuth2-Client

661.1M43](/packages/league-oauth2-instagram)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

261.8M1](/packages/mollie-oauth2-mollie-php)[dalpras/oauth2-gotowebinar

LogMeIn GoToWebinar OAuth 2.0 Client Provider for the PHP League's OAuth 2.0 Client

1245.5k](/packages/dalpras-oauth2-gotowebinar)

PHPackages © 2026

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