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

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

gigabait/laravel-sso
====================

Laravel library for implementing SSO authorizations

v1.0.2(3y ago)2161MITPHPPHP ^7.3|^8.0

Since Mar 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/GIGABAIT93/LaravelSso)[ Packagist](https://packagist.org/packages/gigabait/laravel-sso)[ RSS](/packages/gigabait-laravel-sso/feed)WikiDiscussions main Synced yesterday

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/702e535498d59b695af97aab8bf8841697bb0b00bbe1da9d7be51e1274390d01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67696761626169742f6c61726176656c2d73736f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gigabait/laravel-sso)[![Total Downloads](https://camo.githubusercontent.com/ee768b3ff4c3c1ca7962cfe3ca6f408a2c60d131f1ee93cf1bf909538fd53ef6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67696761626169742f6c61726176656c2d73736f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gigabait/laravel-sso)

Laravel SSO
===========

[](#laravel-sso)

Laravel SSO is a package for implementing Single Sign-On (SSO) authorizations in your Laravel project. This package allows you to authorize users on a Laravel panel from another website.

Requirements
------------

[](#requirements)

- PHP 7.3 or higher
- Laravel 8.0 or higher

Installation
------------

[](#installation)

To install the package, use Composer:

```
composer require gigabait/laravel-sso
```

Configuration
-------------

[](#configuration)

1. Publish the configuration file by running the following command:

```
php artisan vendor:publish --tag=sso
```

This command will publish the config/sso.php file, where you can set the secret key for SSO authorization.

2. Set the secret key in your .env file:

```
SSO_SECRET_KEY=your_secret_key
```

Make sure the secret key is 32 characters long.

Usage
-----

[](#usage)

1. To authorize users on the Laravel panel from another website, first perform SSO authorization on your website.
2. Redirect the user to the /sso-login route with a GET parameter auth\_marker containing the encrypted user data in JSON format. For example:

```
use Illuminate\Encryption\Encrypter;

public function redirectToAppB()
{
    $user = Auth::user();
    $authMarkerData = [
        'email' => $user->email,
        'secret_key' => config('sso.secret_key')
    ];

    $key = config('sso.secret_key');
    $cipher = config('app.cipher');
    $encrypter = new Encrypter($key, $cipher);
    $token = json_encode($authMarkerData);
    $encryptedToken = $encrypter->encrypt($token);

    header("Location: https://app-b.example.com/sso-login?token=" . urlencode($encryptedToken));
}
```

After being redirected to the /sso-login route, the user will be automatically authorized on the Laravel panel if their email address matches a record in the database.

Note
----

[](#note)

Make sure both applications use the same SSO\_SECRET\_KEY in their respective .env files. This is required for the encryption and decryption process to work correctly. The key must be 32 characters long.

Error Handling
--------------

[](#error-handling)

If an error occurs during the SSO process, the user will be redirected to the login page of App B. If the secret key length is not 32 characters, an error message will be displayed.

Support
-------

[](#support)

If you have any questions or issues, please create a new issue in the project repository on GitHub.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](https://github.com/GIGABAIT93/LaravelSso/blob/main/LICENSE) file for details.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

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 ~8 days

Total

3

Last Release

1177d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16218922?v=4)[GIGABAIT](/maintainers/GIGABAIT)[@Gigabait](https://github.com/Gigabait)

---

Top Contributors

[![GIGABAIT93](https://avatars.githubusercontent.com/u/59637348?v=4)](https://github.com/GIGABAIT93 "GIGABAIT93 (20 commits)")

### Embed Badge

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

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

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[althinect/filament-spatie-roles-permissions

3481.1M10](/packages/althinect-filament-spatie-roles-permissions)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.2k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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