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

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

coderfleek/sso-client
=====================

CoderFleek SSO Client for Laravel applications

01PHP

Since May 25Pushed 1y agoCompare

[ Source](https://github.com/sofiquldev/coderfleek-sso-client)[ Packagist](https://packagist.org/packages/coderfleek/sso-client)[ RSS](/packages/coderfleek-sso-client/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

CoderFleek SSO Client for Laravel
=================================

[](#coderfleek-sso-client-for-laravel)

A Laravel package for integrating with CoderFleek's Single Sign-On (SSO) service.

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

[](#installation)

### 1. Install the Package

[](#1-install-the-package)

```
composer require coderfleek/sso-client
```

### 2. Publish Configuration

[](#2-publish-configuration)

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

### 3. Add Environment Variables

[](#3-add-environment-variables)

Add these variables to your `.env` file:

```
CF_SSO_URL=https://sso.test
CF_APP_ID=your_app_id
CF_APP_SECRET=your_app_secret
CF_REDIRECT_URI=https://your-app.com/cf/auth/callback
CF_ROUTE_PREFIX=cf
CF_AUTO_REFRESH=true
CF_REFRESH_THRESHOLD=30
```

### 4. Update User Model

[](#4-update-user-model)

Update your `User` model to implement the SSO interface:

```
use CoderFleek\SSO\Contracts\SsoAuthenticatable;

class User extends Authenticatable implements SsoAuthenticatable
{
    protected $fillable = [
        'name',
        'email',
        'sso_id',
    ];

    public function getSsoIdentifier()
    {
        return $this->sso_id;
    }

    public function setSsoIdentifier($identifier)
    {
        $this->sso_id = $identifier;
    }
}
```

### 5. Run Migrations

[](#5-run-migrations)

```
php artisan migrate
```

This will add the `sso_id` column to your users table.

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

[](#configuration)

The package configuration file will be published at `config/cf-sso.php`. Available options:

```
return [
    'prefix' => env('CF_ROUTE_PREFIX', 'cf'),
    'server_url' => env('CF_SSO_URL'),
    'app_id' => env('CF_APP_ID'),
    'app_secret' => env('CF_APP_SECRET'),
    'redirect_uri' => env('CF_REDIRECT_URI'),
    'auto_refresh' => env('CF_AUTO_REFRESH', true),
    'refresh_threshold' => env('CF_REFRESH_THRESHOLD', 30),
];
```

Usage
-----

[](#usage)

### Protect Routes

[](#protect-routes)

```
// In routes/web.php
Route::middleware(['sso.auth'])->group(function () {
    Route::get('/dashboard', function () {
        return view('dashboard');
    })->name('dashboard');
});
```

### Login Link

[](#login-link)

```
Login with SSO
```

### Logout

[](#logout)

```

    @csrf
    Logout

```

Events
------

[](#events)

The package dispatches several events you can listen for:

- `SsoAuthenticated`: When a user successfully authenticates
- `SsoLoggedOut`: When a user logs out

Security
--------

[](#security)

This package includes:

- CSRF protection via state parameter
- Automatic token refresh
- Secure session handling
- Server-side token verification

License
-------

[](#license)

The MIT License (MIT). Please see LICENSE file for more information.

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

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/33c64f68771d15e58b6aca25b705c55016b85a757626e0de19fde20cbb863cd0?d=identicon)[sofiquldev](/maintainers/sofiquldev)

---

Top Contributors

[![sofiquldev](https://avatars.githubusercontent.com/u/75272105?v=4)](https://github.com/sofiquldev "sofiquldev (1 commits)")

### Embed Badge

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

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

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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