PHPackages                             thuleen/ssomfa - 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. thuleen/ssomfa

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

thuleen/ssomfa
==============

Implements single sign on and multi factor authentication

024[2 PRs](https://github.com/thuleen/ssomfa/pulls)PHP

Since Mar 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/thuleen/ssomfa)[ Packagist](https://packagist.org/packages/thuleen/ssomfa)[ RSS](/packages/thuleen-ssomfa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Single sign on multi factor authentication (SSOMFA)
===================================================

[](#single-sign-on-multi-factor-authentication-ssomfa)

Intergration
============

[](#intergration)

It is assumed that developer have the priviledges to access and modify the target Laravel/PHP application in order to consume the `thuleen/ssomfa` package.

The following are the steps to integrate with the SSOMFA system.

IMPORTANT
=========

[](#important)

It is **required** that your laravel/php application to host on a secure connection using SSL (HTTPS).

Install package
---------------

[](#install-package)

```
composer require thuleen/ssomfa

```

Take note the path of the `ssomfa`.

1. Environment
--------------

[](#1-environment)

Include the following line in the `.env` file of your laravel/php application:

```
APP_ID=1

```

Then, the `'id' => env('APP_ID', '1'),` line in the `/config/app.php`:

```
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\ServiceProvider;

return [
    'id' => env('APP_ID', '1'),
    ...

```

2. Routes
---------

[](#2-routes)

In the `routes/web.php`, add `'ssomfa_verify'` like so:

```
Route::get('/dashboard', function () {
    return view('dashboard');
})->middleware(['auth', 'verified', 'ssomfa_verify'])->name('dashboard');

```

3. Kernel
---------

[](#3-kernel)

In the `app/Http/Kernel.php`, add the following line in the last item;

```
    protected $middlewareAliases = [
        ...
        'ssomfa_verify' => \Thuleen\SsoMfa\Http\Middleware\SsoMfaMiddleware::class
    ];

```

4. AuthenticatedSessionController.php
-------------------------------------

[](#4-authenticatedsessioncontrollerphp)

In the `app/Http/Controllers/Auth/AuthenticatedSessionController.php`, add `app(SsoMfaMiddleware::class)->logout();` in the `destroy` function:

```

use Thuleen\Ssomfa\Http\Middleware\SsoMfaMiddleware; // invalidate();

    $request->session()->regenerateToken();

    return redirect('/');
}

```

5. Install package
------------------

[](#5-install-package)

Then, in the `composer.json` file edit as the followings:

```
    ...

     "require": {
        ...
        "thuleen/ssomfa": "dev-master"
    },

    ...

    "autoload": {
        "psr-4": {
            ...
            "Thuleen\\SsoMfa\\": "vendor/thuleen/ssomfa/src"
        }
    },

```

Then run:

```
composer update
composer dump-autoload

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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/41a97935ae215f4527812b5e1cfb202979f6ae910f5ec5d466bac5d650e4a205?d=identicon)[azizazlan](/maintainers/azizazlan)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/thuleen-ssomfa/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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