mohamed-elsayed-ibrahim/filament-lockscreen

A lockscreen plugin for Filament v3 with inactivity timeout and secure unlock functionality.

Maintainers

Package info

github.com/mohamedElsayedIbrahim/filament-lock-screen

pkg:composer/mohamed-elsayed-ibrahim/filament-lockscreen

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.6 2026-06-06 10:35 UTC

This package is auto-updated.

Last update: 2026-06-06 10:36:12 UTC


README

A modern lock screen plugin for Filament v3 that automatically locks inactive sessions and requires password re-authentication without logging users out.

Latest Version Total Downloads License

Features

  • 🔒 Automatic session locking after inactivity
  • 🔓 Secure password-based unlock
  • 🎨 Modern overlay lock screen
  • ⚡ Native Filament v3 integration
  • 🧩 Plugin-based architecture
  • 📡 Lock / Unlock events
  • ⚙️ Configurable timeout
  • 🚀 No database tables required
  • 🔐 Session-based security
  • 🎯 Easy installation and setup

Requirements

Package Version
PHP 8.1+
Laravel 10.x / 11.x
Filament 3.x

Installation

Install the package via Composer:

composer require mohamed-elsayed-ibrahim/filament-lockscreen

Publish Configuration

php artisan vendor:publish --tag=filament-lock-screen-config

This will create:

config/filament-lock-screen.php

Configuration

return [

    /*
    |--------------------------------------------------------------------------
    | Enable / Disable Plugin
    |--------------------------------------------------------------------------
    */

    'enabled' => true,

    /*
    |--------------------------------------------------------------------------
    | Session Timeout (seconds)
    |--------------------------------------------------------------------------
    */

    'timeout' => env('FILAMENT_LOCK_TIMEOUT', 900),

    /*
    |--------------------------------------------------------------------------
    | Authentication Guard
    |--------------------------------------------------------------------------
    */

    'guard' => 'web',

    /*
    |--------------------------------------------------------------------------
    | Require Password Verification
    |--------------------------------------------------------------------------
    */

    'password_check' => true,

];

Register the Plugin

Inside your Filament Panel Provider:

use MohamedElsayedIbrahim\FilamentLockScreen\FilamentLockScreenPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentLockScreenPlugin::make(),
        ]);
}

How It Works

Activity Tracking

The plugin continuously tracks authenticated user activity.

When no activity occurs within the configured timeout period:

  1. Session becomes locked.
  2. Overlay appears immediately.
  3. User interaction is blocked.
  4. Password verification is required.

Unlock Process

The user enters their current password.

The plugin validates it using Laravel's hashing system:

Hash::check(
    $password,
    auth()->user()->password
);

If valid:

  • Session is restored
  • Lock state is removed
  • User continues working without page reload

Events

Locked Event

use MohamedElsayedIbrahim\FilamentLockScreen\Events\Locked;

Example:

Event::listen(Locked::class, function (Locked $event) {
    logger()->info(
        'User locked',
        ['user_id' => $event->user->id]
    );
});

Unlocked Event

use MohamedElsayedIbrahim\FilamentLockScreen\Events\Unlocked;

Example:

Event::listen(Unlocked::class, function (Unlocked $event) {
    logger()->info(
        'User unlocked',
        ['user_id' => $event->user->id]
    );
});

Customizing the View

Publish views:

php artisan vendor:publish --tag=filament-lock-screen-views

Published location:

resources/views/vendor/filament-lock-screen

You can fully customize:

  • Colors
  • Branding
  • Logo
  • Layout
  • Animations
  • Typography

Example Environment Variables

FILAMENT_LOCK_TIMEOUT=900

Common Values

Time Seconds
5 Minutes 300
10 Minutes 600
15 Minutes 900
30 Minutes 1800
1 Hour 3600

Security

The plugin:

  • Never stores passwords
  • Uses Laravel Hash verification
  • Uses session-based locking
  • Works with Filament authentication
  • Prevents unauthorized access to active sessions

Architecture

src/
├── Contracts/
├── Events/
├── Http/
│   └── Middleware/
├── Livewire/
├── FilamentLockScreenPlugin.php
└── FilamentLockScreenServiceProvider.php

Roadmap

Planned Features

  • PIN Unlock Mode
  • Biometric Unlock Support
  • Multi-panel Support
  • User-specific Timeout Settings
  • Role-based Lock Policies
  • Audit Log Integration
  • Browser Activity Detection
  • Dark Mode Optimizations
  • Team Admin Override

Testing

Run tests:

composer test

or

vendor/bin/phpunit

Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/my-feature
  1. Commit your changes
git commit -m "Add my feature"
  1. Push to GitHub
git push origin feature/my-feature
  1. Open a Pull Request

Changelog

Please see CHANGELOG.md for more information on recent updates.

License

The MIT License (MIT).

Credits

  • Laravel
  • FilamentPHP
  • Livewire

Support

If you discover a bug or have a feature request, please open an issue on GitHub.

GitHub Repository:

https://github.com/mohamedElsayedIbrahim/filament-lock-screen

Made with ❤️ for the Filament community.