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

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

acidwave/laravel-sso
====================

Simple PHP SSO integration for Laravel

1.0.9(2y ago)038MITPHPPHP ^8.0

Since Nov 23Pushed 2y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Simple PHP SSO integration for Laravel
======================================

[](#simple-php-sso-integration-for-laravel)

[![](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)

### Requirements

[](#requirements)

- Laravel 9+
- PHP 8.0+

### Words meanings

[](#words-meanings)

- ***SSO*** - Single Sign-On.
- ***Server*** - page which works as SSO server, handles authentications, stores all sessions data.
- ***Broker*** - your page which is used visited by clients/users.
- ***Client/User*** - your every visitor.

### How it works?

[](#how-it-works)

Client visits Broker and unique token is generated. When new token is generated we need to attach Client session to his session in Broker so he will be redirected to Server and back to Broker at this moment new session in Server will be created and associated with Client session in Broker's page. When Client visits other Broker same steps will be done except that when Client will be redirected to Server he already use his old session and same session id which associated with Broker#1.

Installation
============

[](#installation)

### Server

[](#server)

Install this package using composer.

```
$ composer require acidwave/laravel-sso
```

Copy config file to Laravel project `config/` folder.

```
$ php artisan vendor:publish --provider="AcidWave\LaravelSSO\SSOServiceProvider"
```

Create table where all brokers will be saved.

```
$ php artisan migrate --path=vendor/acidwave/laravel-sso/database/migrations
```

Edit your `app/Http/Kernel.php` by adding queued cookies middleware to `api` middlewares array. This is necessary because we need cookies to work in API routes.

```
'api' => [
    \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
    \Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
],
```

Set new option in your `.env` file:

```
SSO_SESSION_DOMAIN=
```

Now you should create brokers. You can create new broker using following Artisan CLI command:

```
$ php artisan sso:broker:create {name}
```

---

### Broker

[](#broker)

Install this package using composer.

```
$ composer require acidwave/laravel-sso
```

Copy config file to Laravel project `config/` folder.

```
$ php artisan vendor:publish --provider="AcidWave\LaravelSSO\SSOServiceProvider"
```

Change `type` value in `config/laravel-sso.php` file from `server`to `broker`.

Set 4 new options in your `.env` file:

```
SSO_SERVER_URL=
SSO_BROKER_NAME=
SSO_BROKER_SECRET=
SSO_SESSION_DOMAIN=
SSO_TYPE=broker
```

`SSO_SERVER_URL` is your server's http url without trailing slash. `SSO_BROKER_NAME` and `SSO_BROKER_SECRET` must be data which exists in your server's `brokers` table.

Optionally set the column of your authentication username field on your server ('username' by default) `.env` file:

```
SSO_USERNAME_FIELD=email
```

Edit your `app/Http/Kernel.php` by adding `\AcidWave\LaravelSSO\Middleware\SsoAuthCheck::class` middleware to middleware. It should look like this:

```
protected $middleware = [
        ...
        \AcidWave\LaravelSSO\Middleware\SsoAuthCheck::class,
    ];
```

That's all. For other Broker pages you should repeat everything from the beginning just changing your Broker name and secret in configuration file.

Example `.env` options:

```
SSO_SERVER_URL=https://server.test
SSO_BROKER_NAME=site1
SSO_BROKER_SECRET=892asjdajsdksja74jh38kljk2929023
SSO_SESSION_DOMAIN=".server.test"
SSO_USERNAME_FIELD=email
SSO_TYPE=broker
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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.

###  Release Activity

Cadence

Every ~1 days

Total

6

Last Release

895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b355020ad27f4078d4bf20f12be12aab7b58a64b5ff7c166bd4788e56bd39ae?d=identicon)[acidwave](/maintainers/acidwave)

---

Top Contributors

[![acidwave](https://avatars.githubusercontent.com/u/9009357?v=4)](https://github.com/acidwave "acidwave (7 commits)")

---

Tags

laravelAuthenticationSSOlogin

### Embed Badge

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

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

###  Alternatives

[zefy/laravel-sso

Simple PHP SSO integration for Laravel

1033.0k](/packages/zefy-laravel-sso)[maicol07/laravel-oidc-client

OpenID Connect Client for Laravel

251.1k](/packages/maicol07-laravel-oidc-client)

PHPackages © 2026

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