Inactivity Guard plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Inactivity Guard

Community

Gracefully auto-logout users from idle/inactive Filament sessions

Tags: Panel Authentication
Supported versions:
5.x 4.x 3.x
EightCedars avatar Author: EightCedars

Package health

Beta

Automated checks of this plugin's Composer package

80 / 100
Security 64
Maintenance 100
Ecosystem 100
13 checks
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.1 supports current PHP 8.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 157 days ago.
  • Passed: composer.lock not committed by library composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Failed: GitHub Actions pinned to SHA View details on Plumb
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Warning: Dependabot or Renovate configured — Updater does not cover the JavaScript ecosystem, which has a committed lockfile.
  • Failed: Dependency update cooldown configured No cooldown configured in .github/dependabot.yml. View details on Plumb
  • Passed: Provides a security policy
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the 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 .
Powered by Plumb Last scanned 21 hours ago

Documentation

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Guard your Filament dashboard from inactive sessions. Log users out after a predefined period of inactivity.

#Installation

You can install the package via composer:

composer require eightcedars/filament-inactivity-guard

You can publish the config file with:

php artisan vendor:publish --tag="filament-inactivity-guard-config"

This is the contents of the published config file:

return [
     /**
     * Determine if the plugin is enabled
     */
    'enabled' => true,

    /**
     * How long to wait before an idle session is considered inactive.
     * This value must be in seconds
     */
    'inactivity_timeout' => Carbon::SECONDS_PER_MINUTE * env('FILAMENT_IDLE_TIMEOUT', 15),

    /**
     * How long to show an inactive session notice before logging the user out.
     * This value must be in seconds
     *
     * Set this to null or 0 to disable the notice and log out immediately a user's session becomes inactive
     */
    'notice_timeout' => env('FILAMENT_IDLE_WARNING_TIMEOUT', 60),

    /**
     * This package watches for a list of browser events to determine if a user is still active.
     * You may customise as desired.
     *
     * Ensure that the list is not empty
     */
    'interaction_events' => ['mousemove', 'keydown', 'click', 'scroll'],
];

Optionally, you can publish the translation files using

php artisan vendor:publish --tag="filament-inactivity-guard-translations"

You can also publish the view files using

php artisan vendor:publish --tag="filament-inactivity-guard-views"

#Usage

Add the plugin class to your panel ServiceProvider

use EightCedars\FilamentInactivityGuard\FilamentInactivityGuardPlugin;

$panel
    ...
    ->plugin(FilamentInactivityGuardPlugin::make())
    ...

You may also configure the plugin behaviour in your service provider instead of publishing and editing the config file:

use EightCedars\FilamentInactivityGuard\FilamentInactivityGuardPlugin;use Illuminate\Support\Carbon;$panel
    ...
    ->plugin(
        FilamentInactivityGuardPlugin::make()
            ->inactiveAfter(Carbon::SECONDS_PER_MINUTE * 5)
            ->showNoticeFor(Carbon::SECONDS_PER_MINUTE * 1)
            // Or set to null to logout immediately after inactivity
            ->showNoticeFor(null)
            
            ->enabled(!app()->isLocal())
            ->keepActiveOn(['change', 'select', 'mousemove'], mergeWithDefaults: true),
    )
    ...

You can configure the timeout settings using the following environment variables:

Variable Default Description
FILAMENT_IDLE_TIMEOUT 15 minutes Inactivity period before the logout warning dialog is displayed.
FILAMENT_IDLE_WARNING_TIMEOUT 60 seconds Duration the logout warning is displayed before the user is automatically logged out.

#Screenshots

#Available Languages

🇸🇦 Arabic (ar) · 🇧🇩 Bengali (bn) · 🇨🇳 Chinese (Simplified) (zh_CN) · 🇹🇼 Chinese (Traditional) (zh_TW) · 🇩🇰 Danish (da) · 🇳🇱 Dutch (nl) · 🇬🇧 English (en) · 🇮🇷 Farsi / Persian (fa) · 🇫🇮 Finnish (fi) · 🇫🇷 French (fr) · 🇩🇪 German (de) · 🇮🇱 Hebrew (he) · 🇮🇳 Hindi (hi) · 🇮🇸 Icelandic (is) · 🇮🇩 Indonesian (id) · 🇮🇹 Italian (it) · 🇯🇵 Japanese (ja) · 🇰🇷 Korean (ko) · 🇲🇾 Malay (ms) · 🇳🇴 Norwegian (no) · 🇵🇱 Polish (pl) · 🇧🇷 Portuguese (Brazil) (pt_BR) · 🇷🇺 Russian (ru) · 🇪🇸 Spanish (es) · 🇸🇪 Swedish (sv) · 🇹🇭 Thai (th) · 🇹🇷 Turkish (tr) · 🇺🇦 Ukrainian (uk) · 🇻🇳 Vietnamese (vi)

#Testing

composer test

#Changelog

Please see CHANGELOG for more information on what has changed recently.

#Contributing

Please see CONTRIBUTING for details.

#Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

#Credits

#License

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

The author

EightCedars avatar Author: EightCedars

EightCedars is primarily a backend engineer. The simplicity and reliability of the TALL stack makes the occasional times he does heavy frontend work enjoyable. He hopes to make regular contributions to the Filament ecosystem.

Plugins
1
Stars
38