PHPackages                             changyuan/yii2-authclient - 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. changyuan/yii2-authclient

ActiveComposer-pllugin[Authentication &amp; Authorization](/categories/authentication)

changyuan/yii2-authclient
=========================

yii2-authclient for qq weibo wechat

1.0.1(8y ago)5109MITPHP

Since May 10Pushed 8y ago2 watchersCompare

[ Source](https://github.com/changyuan/yii2-authclient)[ Packagist](https://packagist.org/packages/changyuan/yii2-authclient)[ RSS](/packages/changyuan-yii2-authclient/feed)WikiDiscussions master Synced yesterday

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

Yii Authclient for Weibo,QQ,Wechat and etc.
===========================================

[](#yii-authclient-for-weiboqqwechat-and-etc)

[![Latest Stable Version](https://camo.githubusercontent.com/455e6ab62ba05a61cac199be11eec8fbe4705d55aad801e3339d53002dca19d3/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d61757468636c69656e742f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii2-authclient)[![Total Downloads](https://camo.githubusercontent.com/418035437023fb98b1da750646d4a6a13c501b0025402fa2eb87df4eeb26a25f/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d61757468636c69656e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii2-authclient)[![Build Status](https://camo.githubusercontent.com/8e97bab826c13f1290df57841c77b84c120f0ef58ad182a0366669dbde86fb52/68747470733a2f2f7472617669732d63692e6f72672f796969736f66742f796969322d61757468636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yiisoft/yii2-authclient)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist changyuan/yii2-authclient

```

or add

```
"changyuan/yii2-authclient": "~2.1.0"
```

to the `require` section of your composer.json.

Usage
-----

[](#usage)

```
'components' => [
    'authClientCollection' => [
        'class' => 'yii\authclient\Collection',
        'clients' => [
            'weibo' => [
                'class' => 'changyuan\authclient\clients\Weibo',
                'clientId' => 'wb_key',
                'clientSecret' => 'wb_secret',
            ],
            'qq' => [
                'class' => 'changyuan\authclient\clients\QQ',
                'clientId' => 'qq_appid',
                'clientSecret' => 'qq_appkey',
            ],
            'wechat' => [
                'class' => 'changyuan\authclient\clients\Wechat',
                'clientId' => 'weixin_appid',
                'clientSecret' => 'weixin_appkey',
            ],
            'wechatmp' => [
                'class' => 'changyuan\authclient\clients\Wechat',
                'type' => 'mp',
                'clientId' => 'weixin_appid',
                'clientSecret' => 'weixin_appkey',
            ],
        ],
    ]
    // other components
]

```

in view
-------

[](#in-view)

```
 //The first way in view：

 //The second way in view:

```

[参考](https://github.com/yiisoft/yii2-authclient/blob/master/docs/guide/quick-start.md)

Q&amp;A
-------

[](#qa)

Q: this error "Invalid auth state parameter." ?

A: remove sub class `$this->removeState('authState');`

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

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

Total

2

Last Release

3156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cea5724a7121896b8a8aa94ee35e22f3aceae66f68fafa5a78093d5d51e3143?d=identicon)[changyuan](/maintainers/changyuan)

---

Top Contributors

[![changyuan](https://avatars.githubusercontent.com/u/3667295?v=4)](https://github.com/changyuan "changyuan (10 commits)")

---

Tags

apiauthoauthyii2OpenId

### Embed Badge

![Health badge](/badges/changyuan-yii2-authclient/health.svg)

```
[![Health](https://phpackages.com/badges/changyuan-yii2-authclient/health.svg)](https://phpackages.com/packages/changyuan-yii2-authclient)
```

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M68](/packages/auth0-auth0-php)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[yiisoft/yii2-authclient

External authentication via OAuth and OpenID for the Yii framework

4676.2M179](/packages/yiisoft-yii2-authclient)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)[auth0/wordpress

WordPress Plugin for Auth0

17419.5k](/packages/auth0-wordpress)

PHPackages © 2026

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