webbingbrasil/filament-2fa 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webbingbrasil/filament-2fa

最新稳定版本:v1.0.0

Composer 安装命令:

composer require webbingbrasil/filament-2fa

包简介

A 2FA plugin for filament.

README 文档

README

A Two Factor Authentication plugin for Filament

Installation

  1. Install the package via composer (requires filament >= 2.10.40)
composer require webbingbrasil/filament-2fa
  1. Publish assets and run migrations
php artisan vendor:publish --tag="filament-2fa-migrations" php artisan migrate

Optionally, you can publish config or views:

php artisan vendor:publish --tag="filament-2fa-config" php artisan vendor:publish --tag="filament-2fa-views"
  1. Add \Webbingbrasil\FilamentTwoFactor\TwoFactorAuthenticatable trait to your user model.

  2. Update the config/filament.php to point to the Two Factor Login::class.

"auth" => [ "guard" => env("FILAMENT_AUTH_GUARD", "web"), "pages" => [ "login" => \Webbingbrasil\FilamentTwoFactor\Http\Livewire\Auth\Login::class, ], ],

Integrate With Custom Profile Page

This package has a component for two-factor setup that can be easily added to a profile page, like the one for filament-jetstream-theme.

Create a view with the <livewire:filament-two-factor-form> component like the example below:

// resources/views/partials/2fa-section.blade.php <hr /> <x-filament-jetstream::grid-section class="mt-8"> <x-slot name="title"> {{ __('filament-2fa::two-factor.title') }} </x-slot> <x-slot name="description"> {{ __('filament-2fa::two-factor.description') }} </x-slot> <div class="space-y-3"> <x-filament::card> <livewire:filament-two-factor-form> </x-filament::card> </div> </x-filament-jetstream::grid-section>

Then add the view to your profile page using render hook:

## in Service Provider file public function boot() { Filament::registerRenderHook( 'filament-jetstream.profile-page.end', fn (): View => view('partials.2fa-section'), ); }

Screenshots

Two Factor Page Confirm Password Finishing enable Recovery codes Enabled Challenge Breezy

Credits

License

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

统计信息

  • 总下载量: 37.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 47
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 47
  • Watchers: 4
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固