User sessions
CommunityView active user sessions, inspect login details, and revoke access in one click.
Author:
Smony
Package health
BetaAutomated checks of this plugin's Composer package
13 checks
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
- Skipped: GitHub Actions pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Dependabot or Renovate configured
- Skipped: Dependency update cooldown configured
- Failed: Provides a security policy — View details on Plumb
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
See every active session across your app — who's logged in, from where, on what device — and force-logout anyone with one click, right from your Filament admin panel.
#Requirements
- Laravel with
SESSION_DRIVER=database(this plugin reads thesessionstable, so file/cookie/array drivers won't work) - Filament v4 or v5
Still on Filament v3? Use
composer require smony/filament-user-sessions:^1.0instead.
#Installation
composer require smony/filament-user-sessions
Make sure you have the sessions table migration (Laravel ships one, or generate it):
php artisan session:table
php artisan migrate
Register the plugin in your Panel Provider:
use Smony\FilamentUserSessions\FilamentUserSessionsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(FilamentUserSessionsPlugin::make());
}
#What you get
- A Sessions page listing every active session: user, IP address, parsed device/browser, last activity
- An "Online now" stat widget
- A Revoke action to instantly force-logout any session (except your own current one)
- Bulk revoke for cleaning up stale sessions
#Configuration
Optionally publish the config to change the sessions table name or the "online" threshold:
php artisan vendor:publish --tag=filament-user-sessions-config
#Authorization
By default, any user who can access your panel can view all sessions and revoke any of them (except their own current one). If that's too permissive — e.g. you don't want a support-role admin to be able to kick out a superadmin — register your own policy for the Session model in your AuthServiceProvider:
use Illuminate\Support\Facades\Gate;
use Smony\FilamentUserSessions\Models\Session;
Gate::policy(Session::class, YourSessionPolicy::class);
Your policy can implement viewAny, view, delete, and deleteAny — the same names Laravel and Filament use for standard CRUD abilities:
class YourSessionPolicy
{
public function viewAny(User $user): bool
{
return $user->isAdmin();
}
public function delete(User $user, Session $session): bool
{
return $user->isSuperAdmin() || $session->user_id === $user->id;
}
public function deleteAny(User $user): bool
{
return $user->isSuperAdmin();
}
}
Registering it in your own AuthServiceProvider overrides the package's permissive default, since app providers boot after package providers.
#License
MIT
The author
From the same author
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Data Lens
Advanced Data Visualization for Laravel Filament - a premium reporting solution enabling custom column creation, sophisticated filtering, and enterprise-grade data insights within admin panels.
Padmission