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

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

chenye2017/login
================

fast third person login

13PHP

Since Dec 13Pushed 7y agoCompare

[ Source](https://github.com/chenye2017/login)[ Packagist](https://packagist.org/packages/chenye2017/login)[ RSS](/packages/chenye2017-login/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

 login
=======

[](#-login-)

 fast third person login.

Installing
----------

[](#installing)

```
$ composer require chenye2017/login dev-master
```

Usage
-----

[](#usage)

获取qq登陆地址

```
use Chenye2017\Login\Login as CLogin
$login = new CLogin($this->clientId, $this->clientSecret, $this->redirectUri, $state); // state 是你可以想传递的任意参数，在回调地址中可以获取到,默认是空
$loginAddress = $login->LoginAddress();

```

取用户信息

```
$login = new CLogin($this->clientId, $this->clientSecret, $this->redirectUri, $state);
$userinfo = $login->getUser($code); // code 是回调地址中的接收到的code,只能用一次

```

返回结果

```
{
    "ret": 0,
    "msg": "",
    "is_lost": 0,
    "nickname": "四月的谎言",
    "gender": "男",
    "province": "安徽",
    "city": "合肥",
    "year": "1994",
    "constellation": "",
    "figureurl": "http://qzapp.qlogo.cn/qzapp/101532880/C78FBCE1F9041715BE92435B19F5F895/30",
    "figureurl_1": "http://qzapp.qlogo.cn/qzapp/101532880/C78FBCE1F9041715BE92435B19F5F895/50",
    "figureurl_2": "http://qzapp.qlogo.cn/qzapp/101532880/C78FBCE1F9041715BE92435B19F5F895/100",
    "figureurl_qq_1": "http://thirdqq.qlogo.cn/qqapp/101532880/C78FBCE1F9041715BE92435B19F5F895/40",
    "figureurl_qq_2": "http://thirdqq.qlogo.cn/qqapp/101532880/C78FBCE1F9041715BE92435B19F5F895/100",
    "is_yellow_vip": "0",
    "vip": "0",
    "yellow_vip_level": "0",
    "level": "0",
    "is_yellow_year_vip": "0",
    "openid": "C78FBCE1F9041715BE92435B19F5F895"
}

```

TODO
----

[](#todo)

- 添加微博登录
- 添加github登陆
- 添加单元测试
- 拒绝登陆时候的处理
- 异常处理
- http请求处理
- 单元测试

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/chenye2017/login/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/chenye2017/login/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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/c95a8361a5fe01c3d4c7c990ff7f2ef9794e9be0cc4b9c3feccadbbbb2bb3cfe?d=identicon)[chenye2017](/maintainers/chenye2017)

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/chenye2017-login/health.svg)](https://phpackages.com/packages/chenye2017-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)
