PHPackages                             cleaniquecoders/laravel-single-session - 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. cleaniquecoders/laravel-single-session

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

cleaniquecoders/laravel-single-session
======================================

Enable only single session of user logged in to your Laravel application.

v1.0.0(7y ago)012MITPHPPHP &gt;=7.1

Since Nov 30Pushed 7y agoCompare

[ Source](https://github.com/cleaniquecoders/laravel-single-session)[ Packagist](https://packagist.org/packages/cleaniquecoders/laravel-single-session)[ RSS](/packages/cleaniquecoders-laravel-single-session/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/de54700a3b0fa130b073984e5d8281b4375127057f420a85507dab0f63f31bd8/68747470733a2f2f7472617669732d63692e6f72672f636c65616e69717565636f646572732f6c61726176656c2d73696e676c652d73657373696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cleaniquecoders/laravel-single-session) [![Latest Stable Version](https://camo.githubusercontent.com/2af98c9f3946864c8b72265fca02862c9fe45f7639d84e8d9150631e7002128b/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f6c61726176656c2d73696e676c652d73657373696f6e2f762f737461626c65)](https://packagist.org/packages/cleaniquecoders/laravel-single-session) [![Total Downloads](https://camo.githubusercontent.com/647ff7449cb7eaa324868e8ef2e197e79679aa0d61066a6ba43c6452f69bac75/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f6c61726176656c2d73696e676c652d73657373696f6e2f646f776e6c6f616473)](https://packagist.org/packages/cleaniquecoders/laravel-single-session) [![License](https://camo.githubusercontent.com/d3210fa557dd5c47ea730e28c035282e15057589564f66aedf6e94c600a517d5/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f6c61726176656c2d73696e676c652d73657373696f6e2f6c6963656e7365)](https://packagist.org/packages/cleaniquecoders/laravel-single-session)

About Your Package
------------------

[](#about-your-package)

This package let only single user logged in at one time. If user try to login from multiple devices / browsers, it will prevent the user login from other sources.

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

[](#installation)

1. In order to install `cleaniquecoders/laravel-single-session` in your Laravel project, just run the *composer require* command from your terminal:

```
$ composer require cleaniquecoders/laravel-single-session

```

2. Then in your `config/app.php` add the following to the providers array:

```
CleaniqueCoders\LaravelSingleSession\LaravelSingleSessionServiceProvider::class,
```

3. In the same `config/app.php` add the following to the aliases array:

```
'LaravelSingleSession' => CleaniqueCoders\LaravelSingleSession\LaravelSingleSessionFacade::class,
```

4. Publish assets and configuration:

```
$ php artisan vendor:publish --provider=CleaniqueCoders\LaravelSingleSession\LaravelSingleSessionServiceProvider

```

5. Add the following in your `app/Exception/Handler.php` on `render` method:

```
use CleaniqueCoders\LaravelSingleSession\Exceptions\SingleSessionException;
...
public function render($request, Exception $exception)
{
	if ($exception instanceof SingleSessionException) {
	    return response()->view('single-session::errors.single-session', [], 401);
	}
...
```

Usage
-----

[](#usage)

By default Laravel Single Session is disabled. You can turn it on in `.env`:

```
SINGLE_SESSION_ENABLED=true

```

By default, Laravel Single Session use `email` field from login form. You may overwrite it in `config/single-session.php`, key `credential`.

Test
----

[](#test)

Run the following command:

```
$ vendor/bin/phpunit  --testdox --verbose

```

Contributing
------------

[](#contributing)

Thank you for considering contributing to the `cleaniquecoders/laravel-single-session`!

### Bug Reports

[](#bug-reports)

To encourage active collaboration, it is strongly encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing a failing test.

However, if you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.

Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.

Coding Style
------------

[](#coding-style)

`cleaniquecoders/laravel-single-session` follows the PSR-2 coding standard and the PSR-4 autoloading standard.

You may use PHP CS Fixer in order to keep things standardised. PHP CS Fixer configuration can be found in `.php_cs`.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

2770d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b57069d0f4b634f65eccc6e5d5848990e25968d45ec2cf46d626c6a4658f944b?d=identicon)[nasrulhazim.m](/maintainers/nasrulhazim.m)

---

Top Contributors

[![nasrulhazim](https://avatars.githubusercontent.com/u/10341422?v=4)](https://github.com/nasrulhazim "nasrulhazim (22 commits)")

---

Tags

laravelpackagesessionsingle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cleaniquecoders-laravel-single-session/health.svg)

```
[![Health](https://phpackages.com/badges/cleaniquecoders-laravel-single-session/health.svg)](https://phpackages.com/packages/cleaniquecoders-laravel-single-session)
```

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.2M17](/packages/directorytree-ldaprecord-laravel)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2013.2k](/packages/alajusticia-laravel-logins)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1542.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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