PHPackages                             keenops/auth-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. keenops/auth-client

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

keenops/auth-client
===================

OAuth2 SSO client SDK for integrating Laravel applications with the Central Authentication Server

1.0.1(1mo ago)01↓100%MITPHPPHP ^8.4

Since Mar 7Pushed 1mo agoCompare

[ Source](https://github.com/keenops/auth-client)[ Packagist](https://packagist.org/packages/keenops/auth-client)[ Docs](https://github.com/keenops/auth-client)[ RSS](/packages/keenops-auth-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

Keenops Auth Client
===================

[](#keenops-auth-client)

OAuth2 SSO client SDK for integrating Laravel applications with the Central Authentication Server.

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

[](#installation)

Install via Composer:

```
composer require keenops/auth-client
```

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

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=auth-client-config
```

Add the following environment variables to your `.env` file:

```
AUTH_SERVER_URL=https://your-auth-server.com
AUTH_CLIENT_ID=your-client-id
AUTH_CLIENT_SECRET=your-client-secret
AUTH_REDIRECT_URI=https://your-app.com/auth/callback
AUTH_SCOPES=read-user
AUTH_BACKCHANNEL_LOGOUT_SECRET=your-backchannel-secret
```

Usage
-----

[](#usage)

### SSO Authentication

[](#sso-authentication)

The package automatically registers the following routes:

- `GET /auth/redirect` - Redirect to auth server for login
- `GET /auth/callback` - Handle callback from auth server
- `POST /auth/logout` - Logout and revoke token
- `POST /auth/backchannel-logout` - Backchannel logout webhook

### Protecting Routes

[](#protecting-routes)

Use the provided middleware to protect routes:

```
// Require authentication
Route::middleware('auth.server')->group(function () {
    Route::get('/dashboard', DashboardController::class);
});

// Require specific permissions
Route::middleware(['auth.server', 'server.permission:manage_users'])->group(function () {
    Route::get('/admin/users', UserController::class);
});
```

### Accessing the Authenticated User

[](#accessing-the-authenticated-user)

```
use Illuminate\Support\Facades\Auth;

$user = Auth::guard('auth-server')->user();

// Check roles
if ($user->hasRole('admin')) {
    // ...
}

// Check permissions
if ($user->hasPermission('create_post')) {
    // ...
}
```

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance96

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

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

Total

2

Last Release

52d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/979e7b5ad115c575c452f36f2316011ad49f9bb01cf45c5eb68d069af01ed64e?d=identicon)[kimwalu](/maintainers/kimwalu)

---

Top Contributors

[![keenops](https://avatars.githubusercontent.com/u/37520787?v=4)](https://github.com/keenops "keenops (3 commits)")

---

Tags

laravelSSOoauth2auth-clientkeenops

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/keenops-auth-client/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M52](/packages/php-open-source-saver-jwt-auth)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[rahul900day/laravel-captcha

Different types of Captcha implementation for Laravel Application.

10715.9k](/packages/rahul900day-laravel-captcha)

PHPackages © 2026

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