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

ActiveLibrary

eighteen73/laravel-sso
======================

Abstract SSO logic into a reusable, self-contained Laravel package.

00PHPCI failing

Since Mar 22Pushed 1mo agoCompare

[ Source](https://github.com/eighteen73/laravel-sso)[ Packagist](https://packagist.org/packages/eighteen73/laravel-sso)[ RSS](/packages/eighteen73-laravel-sso/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Eighteen73 SSO
==============

[](#eighteen73-sso)

A reusable Laravel package for integrating Single Sign-On (SSO) using Laravel Socialite, with built-in support for Zitadel and Filament.

**Note:** This is an opinionated, internal project designed primarily to meet the requirements of eighteen73. While it is open-sourced and feedback is welcome, its development is driven by our specific needs and workflows.

Features
--------

[](#features)

- Automatic Socialite provider registration for Zitadel.
- Dedicated `sso_accounts` table to map SSO identities to local users.
- Configurable user resolution and auto-creation logic.
- Automatic integration with Filament login forms via render hooks.
- Support for multiple SSO connections per user.

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

[](#installation)

You can install the package via composer:

```
composer require eighteen73/laravel-sso
```

You should publish the migration and the config file with:

```
php artisan vendor:publish --tag="sso-config"
php artisan vendor:publish --tag="sso-migrations"
```

Run the migrations:

```
php artisan migrate
```

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

[](#configuration)

The configuration file is located at `config/sso.php`. You can customise the following:

- `provider`: The Socialite driver to use (defaulting to `zitadel`).
- `auto_create_users`: Whether to create a new local user if the SSO email is not found.
- `redirect_path`: The path to redirect to after a successful login.
- `user_resolver`: The action class used to map SSO data to a local user.
- `filament`: Settings for Filament integration, including which panels to display the SSO button on.

Global Logout
-------------

[](#global-logout)

The package provides a `/sso/logout` route that not only logs the user out of your local Laravel application but also securely terminates their global SSO session at Zitadel (or the active provider). By default, the user will be redirected back to your application's home page after logging out of Zitadel.

To customise the return path, ensure you set the `ZITADEL_POST_LOGOUT_REDIRECT_URI` environment variable in your host application:

```
ZITADEL_POST_LOGOUT_REDIRECT_URI=https://your-app.com/logged-out
```

Customising User Resolution
---------------------------

[](#customising-user-resolution)

If you need to perform additional logic when a user is resolved (such as assigning roles or updating custom attributes), you can create a custom action that implements `Eighteen73\SSO\Actions\ResolveUserContract` and update the `user_resolver` in your config.

```
namespace App\Actions;

use Eighteen73\SSO\Actions\ResolveUser;
use Laravel\Socialite\Contracts\User as ProviderUser;
use Illuminate\Contracts\Auth\Authenticatable;

class CustomResolveUser extends ResolveUser
{
    public function resolve(string $provider, ProviderUser $ssoUser): Authenticatable
    {
        $user = parent::resolve($provider, $ssoUser);

        // Add your custom logic here

        return $user;
    }
}
```

Testing
-------

[](#testing)

The package uses Pest for testing. You can run the tests with:

```
./vendor/bin/pest
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance59

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6334a9b62ab581e2a9fe889d0e1777463e02096e38d941351ca2800f1460a8d?d=identicon)[edjeavons](/maintainers/edjeavons)

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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