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 1mo ago

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 37% 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

1123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db472b0bec1257dc2181c155e99df21497e66cb94fa607752c9f95d76786e6d7?d=identicon)[GIGABAIT](/maintainers/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

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[stechstudio/laravel-jwt

Helper package that makes it easy to generate, consume, and protect routes with JWT tokens in Laravel

126117.6k](/packages/stechstudio-laravel-jwt)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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