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

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

smoothbytes/sso
===============

Social&amp;Loyal Simple Single Sign-On

v0.0.1(7y ago)028MITPHPPHP &gt;=5.5.0

Since Jun 17Pushed 7y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Single Sign-On for PHP (Ajax compatible)
----------------------------------------

[](#single-sign-on-for-php-ajax-compatible)

This sso client it is based on the [LegalThings/SSO](https://github.com/legalthings/sso) developed by [Jasny](https://github.com/jasny).

For a more indepth explanation of the SSO implementation, please [read this article](https://github.com/jasny/sso/wiki)

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

[](#installation)

Install this library through composer

```
composer require smoothbytes/sso

```

Usage
-----

[](#usage)

### Broker (Client)

[](#broker-client)

When creating a Jasny\\SSO\\Broker instance, you need to pass the server url, broker id and broker secret. The broker id and secret needs to be registered at the server (so fetched when using `getBrokerInfo($brokerId)`).

**Be careful**: *The broker id SHOULD be alphanumeric. In any case it MUST NOT contain the "-" character.*

Next you need to call `attach()`. This will generate a token an redirect the client to the server to attach the token to the client's session. If the client is already attached, the function will simply return.

When the session is attached you can do actions as login/logout or get the user's info.

```
$broker = new Sal\SSO\Broker($serverUrl, $brokerId, $brokerSecret);
$broker->attach();

$user = $broker->getUserInfo();
echo json_encode($user);
```

For more information, checkout the `broker` and `ajax-broker` examples in [sso-examples](https://github.com/SmoothBytes/sso-examples).

\##Notes

- This is only for login and logout to be able to register new clients you need to use SAL api

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

2889d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d823de01f1d5a392de763437768b369e74fc263013b84d045e97faf2ad62903?d=identicon)[salteam](/maintainers/salteam)

---

Top Contributors

[![argami](https://avatars.githubusercontent.com/u/230512?v=4)](https://github.com/argami "argami (6 commits)")

---

Tags

authSSO

### Embed Badge

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

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

###  Alternatives

[jasny/sso

Simple Single Sign-On

1.5k255.9k6](/packages/jasny-sso)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)[maicol07/flarum-ext-sso

SSO for Flarum

468.3k](/packages/maicol07-flarum-ext-sso)[casdoor/casdoor-php-sdk

PHP client SDK for Casdoor

2219.3k](/packages/casdoor-casdoor-php-sdk)

PHPackages © 2026

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