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

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

cblink/laravel-sso
==================

1.0.1(7y ago)1231.8k27[1 issues](https://github.com/cblink/laravel-sso/issues)MITPHP

Since Aug 1Pushed 7y ago6 watchersCompare

[ Source](https://github.com/cblink/laravel-sso)[ Packagist](https://packagist.org/packages/cblink/laravel-sso)[ RSS](/packages/cblink-laravel-sso/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

laravel-sso
===========

[](#laravel-sso)

install
-------

[](#install)

`composer require cblink/laravel-sso -vvv`

configure
---------

[](#configure)

### publish config.php and migration

[](#publish-configphp-and-migration)

`php artisan vendor:publish --provider="Cblink\Sso\SsoServiceProvider"`

### migrate:

[](#migrate)

`php artisan migrate`

this command will create a table name sso to authorize.

### create sso route:

[](#create-sso-route)

`php artisan sso:route`

### also you can create sso through command

[](#also-you-can-create-sso-through-command)

`php artisan sso:create`

### add to your auth.php:

[](#add-to-your-authphp)

```
'guards' => [
    'sso' => [
        'driver' => 'session',
        'provider' => 'sso',
    ],
],
'providers' => [
    'sso' => [
        'driver' => 'sso',
        'table' => 'sso',
    ],
],
```

usage
-----

[](#usage)

### Get ticket in client

[](#get-ticket-in-client)

```
// sso client system
Route::get('sso', function () {
    $client = new \GuzzleHttp\Client();

    $response = $client->get('http://yourdomain/sso/getTicket?'.http_build_query([
        'app_id' => 'your_app_id',
        'secret' => 'your_secret',
    ]));

    $result = json_decode((string)$response->getBody(), true);

    if ($ticket = $result['ticket'] ?? null) {
        return redirect('http://yourdomain/sso/login?ticket='.$ticket);
    }
});
```

### Redirect to any url

[](#redirect-to-any-url)

add middleware to `Http/kernel.php`

```
protected $routeMiddleware = [
    // ...
    'ticket' => \Cblink\Sso\Http\Middleware\LoginWithTicket::class,
];

// declare route priority
protected $middlewarePriority = [
    \Illuminate\Session\Middleware\StartSession::class,
    \Illuminate\View\Middleware\ShareErrorsFromSession::class,
    \Cblink\Sso\Http\Middleware\LoginWithTicket::class,
    \Illuminate\Auth\Middleware\Authenticate::class,
    \Illuminate\Session\Middleware\AuthenticateSession::class,
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
    \Illuminate\Auth\Middleware\Authorize::class,
];
```

in web.php , add `ticket` before `auth`：

```
Route::group(['middleware' => ['ticket', 'auth'], function () {
    // ...
});
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 85% 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 ~13 days

Total

2

Last Release

2827d ago

### Community

Maintainers

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

---

Top Contributors

[![Hanson](https://avatars.githubusercontent.com/u/10583423?v=4)](https://github.com/Hanson "Hanson (17 commits)")[![mouyong](https://avatars.githubusercontent.com/u/10336437?v=4)](https://github.com/mouyong "mouyong (3 commits)")

### Embed Badge

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

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

###  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)
