PHPackages                             ccq18/sso - 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. ccq18/sso

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

ccq18/sso
=========

单点登录

30[4 PRs](https://github.com/ccq18/sso/pulls)PHP

Since Jan 10Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (5)Used By (0)

演示
--

[](#演示)

[演示1](http://test.auth.issue.pw/)
账号： 123456

[演示2](http://test.service.issue.pw/)
账号： 123456 [演示3](http://test.iword.issue.pw/)
账号： 123456

sso安装
-----

[](#sso安装)

重命名 .env.example 为.env 配置 .env 文件

配置jwt
-----

[](#配置jwt)

composer require tymon/jwt-auth 1.0.0-rc.4.1

```
'providers' => [

    ...

    Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
]

```

```
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

```

```
php artisan jwt:secret

```

接入
--

[](#接入)

1.auth.php

guards

```
'sso' => [
            'driver' => 'session',
            'provider' => 'sso_authorized_users',
        ],

```

providers 加入

```
'sso_authorized_users' => [
               'driver' => 'sso_authorization',
           ],

```

AuthServiceProvider

```
Auth::provider('sso_authorization', function () {
  return new SsoUserProvider();
});

```

AppServiceProvider

```
$this->app->singleton('ssohelper', function ($app) {
      return new \SsoAuth\AuthHelper( env('AUTH_SERVER'),env('API_SECRET'));
});
$this->app->alias('ssohelper',\SsoAuSsoAuthth\AuthHelper::class);

```

2.middleware 加入

'ssoauth' =&gt;\\SsoAuth\\Middleware\\SsoAuthenticate::class,

3.route.php

```
Route::group(['middleware' => ['ssoauth']], function () {

});
Route::get('/logout', function (){
    auth('sso')->logout();
    return redirect(resolve(SsoAuth\AuthHelper::class)->getLogoutUrl(build_url('/')));
});

```

4.登录注册链接生成

```

function login_url(){
    return resolve(SsoAuth\AuthHelper::class)->getLoginUrl(route('home'));
}

function logout_url(){
    return url('/sso/logout');
}
function register_url(){
    return resolve(SsoAuth\AuthHelper::class)->getRegisterUrl();
}

```

\#todo ssoauth 从service 解耦

提交sso-auth
----------

[](#提交sso-auth)

git subtree add --prefix src/Ccq18/SsoAuth --squash sso-auth master git subtree push --prefix=src/Ccq18/SsoAuth sso-auth master

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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://avatars.githubusercontent.com/u/5117266?v=4)[ccq18](/maintainers/ccq18)[@ccq18](https://github.com/ccq18)

---

Top Contributors

[![ccq18](https://avatars.githubusercontent.com/u/5117266?v=4)](https://github.com/ccq18 "ccq18 (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/ccq18-sso/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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