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

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

yii2-login/login
================

QQ登录和微信登录封装在Yii2框架扩展。

112PHP

Since Sep 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gaoxuxu123/easy-login)[ Packagist](https://packagist.org/packages/yii2-login/login)[ RSS](/packages/yii2-login-login/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

\##安装

```

composer require yii2-login dev-master

或者在composer.json中加入

 "require": {

        "yii2-login": "dev-master"
}

```

更新依赖 `composer update`

\##使用说明

\##DEMO

```

public function actionIndex()
    {
        /*$auth = EasyAuth::getInstance('qq');
        $auth->setAppKey('*');
        $auth->setAppSecret('*');
        $auth->setCallback('http:/域名/login/callback?type=qq');
        \Yii::$app->response->redirect($auth->getRequestCodeURL());*/
        $auth = EasyAuth::getInstance('weixin');
        $auth->setAppKey('*');
        $auth->setAppSecret('*');
        $auth->setCallback('http:/域名/login/callback?type=wx');
        \Yii::$app->response->redirect($auth->getRequestCodeURL());
    }
    //回调方法
    public function actionCallback()
    {

        $code  =  \Yii::$app->request->get('code');
        $state =  \Yii::$app->request->get('state');
        $type = \Yii::$app->request->get('type');
        if($type == 'qq'){

            $auth = EasyAuth::getInstance('qq');
            $auth->setAppKey('*');
            $auth->setAppSecret('*');
            $auth->getAccessToken($code);

            $result = $auth->getUserInfo('oauth2.0/me');

        }else if($type == 'wx'){

            $auth = EasyAuth::getInstance('weixin');
            $auth->setAppKey('*');
            $auth->setAppSecret('*');
            $auth->getAccessToken($code);

            $result = $auth->getUserInfo('sns/userinfo');

        }

    }

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

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

---

Top Contributors

[![gaoxuxu123](https://avatars.githubusercontent.com/u/11934791?v=4)](https://github.com/gaoxuxu123 "gaoxuxu123 (2 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

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

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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