Download the PHP package kwhorne/wirement-breeze without Composer
On this page you can find all versions of the php package kwhorne/wirement-breeze. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kwhorne/wirement-breeze
More information about kwhorne/wirement-breeze
Files in kwhorne/wirement-breeze
Package wirement-breeze
Short Description A custom package for Filament with login flow, profile and teams support.
License MIT
Homepage https://github.com/kwhorne/wirement-breeze
Informations about the package wirement-breeze
Wirement Breeze
Enhanced security for Filament v4+ Panels
Wirement Breeze is a complete security package for Filament v4+ panels. The package includes a customizable "My Profile" page with personal information and avatar support, password updates, two-factor authentication, and Sanctum token management.
โจ Key Features
- ๐ Two-factor authentication with recovery codes
- ๐ค My Profile page with avatar support
- ๐ Password updates with customizable validation rules
- ๐ก๏ธ Password confirmation for sensitive actions
- ๐ซ Sanctum token management
- ๐ Browser session management
- โก Quick installation - ready in minutes!
๐ Compatibility
- Laravel 12+ (with full support for Laravel 12 features)
- Filament v4.0+ (optimized for latest Filament features)
- TailwindCSS v4.0+ (compatible with modern CSS features)
- PHP 8.2+ (supports PHP 8.2, 8.3, and 8.4)
๐ธ Features
My Profile - Personal information with avatar support
Password updates with customizable validation rules
Protected actions with password confirmation
Two-factor authentication with recovery codes
Required two-factor authentication
Sanctum token management
Browser session management
๐ฆ Installation
Install the package via Composer:
Publish views (optional)
Publish translations (optional)
โ๏ธ Usage & Configuration
You must enable Wirement Breez by adding the class to your Filament Panel's plugin() or plugins([]) method:
Update auth guard
Wirement Breez will use the authGuard set on the Filament Panel that you create. You may update the authGuard as you please:
NOTE: you must ensure that the model used in your Guard extends the Authenticatable class.
My Profile
Enable the My Profile page with configuration options.
NOTE: if you are using avatars,
Custom My Profile page class
You can also use a custom My Profile page class by extending the default one, and registering it with the plugin.
Using avatars in your Panel
The instructions for using custom avatars is found in the Filament v4 docs under Setting up user avatars.
Here is a possible implementation using the example from the docs:
Customize the avatar upload component
Add column to table
If you wish to have your own avatar, you need to create a column on the users table named avatar_url. It is recommended that you create a new migration for it, and add the column there:
Add column to user model
Customize password update
You can customize the validation rules for the update password component by passing an array of validation strings, or an instance of the Illuminate\Validation\Rules\Password class.
Exclude default My Profile components
If you don't want a default My Profile page component to be used, you can exclude them using the withoutMyProfileComponents helper.
Create custom My Profile components
In Wirement Breeze, you can now create custom Livewire components for the My Profile page and append them easily.
-
Create a new Livewire component in your project using:
-
Extend the
MyProfileComponentclass included with Wirement Breeze. This class implements Actions and Forms. -
Within your Livewire component's view, you can use Wirement Breeze's
grid-sectionblade component to match the style: - Finally, register your new component with Wirement Breeze:
Override My Profile components
You may override the existing MyProfile components to replace them with your own:
If you want to customize only the fields and notification in the personal info component, you can extend the original breezy component:
Now, as mentioned above, give this component to WirementBreezeCore::make()->myProfileComponents to override the original and use your custom component.
Sorting My Profile components
Custom MyProfile components can be sorted by setting their static $sort property. This property can be set for existing MyProfile components in any service provider:
A lot of the time this won't be necessary, though, as the default sort order is spaced out in steps of 10, so there should be enough numbers to place any custom components in between.
Two Factor Authentication
-
Add
Kwhorne\WirementBreeze\Traits\TwoFactorAuthenticatableto your Authenticatable model: -
Enable Two Factor Authentication using the
enableTwoFactorAuthentication()method on the Wirement Breeze plugin. - Adjust the 2FA page
The Wirement Breeze 2FA page can be swapped for a custom implementation (see above), same as the Filament auth pages. This allows, for example, to define a custom auth layout like so:
Sanctum Personal Access tokens
As of Laravel 8.x Sanctum is included with Laravel, but if you don't already have the package follow the installation instructions here.
Enable the Sanctum token management component:
Password Confirmation Button Action
This button action will prompt the user to enter their password for sensitive actions (eg. delete). This action uses the same 'password_timeout' number of seconds found in config/auth.php.
Browser Sessions
The Browser Sessions feature, which is disabled by default, allows users to manage their active sessions on different devices and remotely log out of other browser sessions, enhancing account security. To enable this feature, you must use the enableBrowserSessions method.
Enabling Browser Sessions
To enable the Browser Sessions feature, use the enableBrowserSessions method in WirementBreezeCore:
Viewing Active Sessions
On the user's profile page, active sessions are displayed with device information, including:
- Browser and platform of the device
- IP address
- Last activity of the session
Logging Out of Other Browser Sessions
Users can log out of other active sessions by entering their password for confirmation. This allows them to securely log out of all other active sessions on other devices.
Additional Configuration
If you want to customize the component or modify its behavior, you can override the browser_sessions component in the myProfileComponents method:
Customizing Registration Forms
Filament v4+ introduces enhanced capabilities for handling and customizing registration forms seamlessly.
๐โโ๏ธ Frequently Asked Questions (FAQ)
How do 2FA sessions work across multiple panels?
By default, Wirement Breeze uses the same guard as defined on your Panel. The default is 'web'. Only panels that have registered the WirementBreezeCore plugin will have access to 2FA. If multiple panels use 2FA and share the same guard, the user only needs to enter the OTP code once for the duration of the session.
How does 2FA interact with MustVerifyEmail?
When 2FA is properly configured, the user is prompted for the OTP code before email verification.
How long does the 2FA session last?
The 2FA session is the same as the Laravel session lifetime. When the user is logged out, or the session expires, they must enter the OTP code again.
Which languages are supported?
The package supports 30+ languages including Norwegian (nb). You can publish and customize translations:
Can I customize the appearance?
Yes! You can publish and customize all views:
๐งช Testing
๐ Changelog
Please see CHANGELOG for more information on what has changed recently.
๐ค Contributing
Please see CONTRIBUTING for details on how to contribute.
๐ Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
๐ Quick Start
To get started quickly with Wirement Breez:
-
Install the package:
-
Add plugin to your Panel:
-
Enable 2FA (optional):
- Add trait to User model:
Done! You now have a secure Filament application with profile management and 2FA.
๐ Credits
- Jeff Greco - Original Filament Breezy developer
- Knut W. Horne - Wirement Breeze developer
- All Contributors
๐ License
The MIT License (MIT). Please see License File for more information.
Wirement Breeze - A complete security package for modern Filament v4+ applications.
Developed with โค๏ธ by Knut W. Horne(https://kwhorne.com)
All versions of wirement-breeze with dependencies
bacon/bacon-qr-code Version ^3.0
filament/filament Version ^4.0
illuminate/contracts Version ^11.0|^12.0
jenssegers/agent Version ^2.6
pragmarx/google2fa Version ^8.0
spatie/laravel-package-tools Version ^1.14.0