Password Confirmation
Prompt users to re-enter their password before performing sensitive actions.
Author:
Julio Motol
Documentation
Simplifies adding a secure password confirmation step to your admin panels.
- Prompts users to re-enter their password before performing sensitive actions.
- Increases security by preventing accidental or unauthorized actions due to long session times.
- Easy to integrate and highly configurable.
#Installation
You can install the package via composer:
composer require juliomotol/filament-password-confirmation
Then add the plugin to your panel.
JulioMotol\FilamentPasswordConfirmation\FilamentPasswordConfirmationPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(FilamentPasswordConfirmationPlugin::make());
}
You can configure the route name, uri, middleware and password timeout duration.
FilamentPasswordConfirmationPlugin::make()
->routeName('confirm')
->routeUri('auth/confirm')
->routeMiddleware(FooMiddleware::class) // Accepts string|array
->passwordTimeout(10800) // Accepts int|null that represents the amount of seconds
Optionally, you can publish the translations and views using.
php artisan vendor:publish --tag="filament-password-confirmation-translations"
php artisan vendor:publish --tag="filament-password-confirmation-views"
#Usage
Simply use RequiresPasswordConfirmation in your pages/resources.
use JulioMotol\FilamentPasswordConfirmation\RequiresPasswordConfirmation;
class AdminResource extends Resource
{
use RequiresPasswordConfirmation;
...
}
You can configure the password confirmation timeout within your page/resource.
use JulioMotol\FilamentPasswordConfirmation\RequiresPasswordConfirmation;
class AdminResource extends Resource
{
use RequiresPasswordConfirmation;
protected static ?int $passwordTimeout = 360; // the amount of seconds
...
}
NOTE: The password timeout duration is determined in the following order until it encounters a non-null value.
$passwordTimeoutproperty in the page/resourcepasswordTimeout()configured in the plugin during registryauth.password_timeoutconfig assigned inconfig/auth.php
#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.
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
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
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