moontechs/filament-webauthn
Composer 安装命令:
composer require moontechs/filament-webauthn
包简介
Filament webauthn sign in and registration
README 文档
README
Passwordless login for your Filament app. Web Authentication server-side and front-end components.
The package has the following components:
- registration button and widget
- login form extension to redirect to the webauthn login page
- separate route and page with webauthn login form
Should work with HTTPS and not localhost only.
Installation
You can install the package via composer:
composer require moontechs/filament-webauthn
You should publish and run the migrations with:
php artisan vendor:publish --tag="filament-webauthn-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="filament-webauthn-config"
This is the contents of the published config file:
return [ 'login_page_url' => '/webauthn-login', 'user' => [ 'auth_identifier' => 'email', // column in users table with unique user id ], 'widget' => [ 'column_span' => '', ], 'register_button' => [ 'icon' => 'heroicon-o-key', 'class' => 'w-full', ], 'login_button' => [ 'icon' => 'heroicon-o-key', 'class' => 'w-full', ], 'auth' => [ 'relying_party' => [ 'name' => env('APP_NAME'), 'origin' => env('APP_URL'), 'id' => env('APP_HOST', parse_url(env('APP_URL'))['host']), ], 'client_options' => [ 'timeout' => 60000, 'platform' => '', // available: platform, cross-platform, or leave empty 'attestation' => 'direct', // available: direct, indirect, none 'user_verification' => 'required', // available: required, preferred, discouraged ], ], ];
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-webauthn-views"
You can publish the translation file with:
php artisan vendor:publish --tag="filament-webauthn-translations"
Usage
- Install the package.
- Publish migrations and migrate.
Registration widget
Only signed-in users can register a device to be able to sign in to use it in the future.
- Register
Moontechs\FilamentWebauthn\Widgets\WebauthnRegisterWidget::classwidget. Add it to thewidgets.registerarray of the Filament config.
Customization
- Publish the config file
widget.column_span- widget width (docs)
Registration button (without widget)
- Add
<livewire:webauthn-register-button/>in any view.
Customization
- Publish the config file
register_button.icon- choose any available iconregister_button.class- add more classes or change the default one
Redirect to the login page button
- Publish Filament login page view
php artisan vendor:publish --tag=filament-views - Add
<x-filament-webauthn::login-form-extension />in the end of the login form.
If you didn't want to use this button, you can use a simple redirect to a named route filament-webauthn.login.
Login form
Customization
- Publish the config file
login_button.icon- choose any available iconlogin_button.class- add more classes or change the default one
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.
moontechs/filament-webauthn 适用场景与选型建议
moontechs/filament-webauthn 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33 次下载、GitHub Stars 达 14, 最近一次更新时间为 2022 年 10 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「fido」 「webauthn」 「moontechs」 「filament-webauthn」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 moontechs/filament-webauthn 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 moontechs/filament-webauthn 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 moontechs/filament-webauthn 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
FIDO2/Webauthn Conformance Toolset
Add webauthn functionality to Laravel
Support passkeys and Web Authentication
Login to Flarum with passkey
Authenticate users with just their device, fingerprint or biometric data. Goodbye passwords!
Portable Silverstripe MFA bundle with TOTP and WebAuthn support, plus configurable TOTP settings
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-23


