jampire/moonshine-passkeys
Composer 安装命令:
composer require jampire/moonshine-passkeys
包简介
Biometric Authentication for MoonShine Admin Panel
README 文档
README
Biometrics (Passkeys) for MoonShine Admin Panel
Introduction
This package provides Biometric authentication and authorization for MoonShine admin panel. It's based on Passkeys technology using WebAuthn protocol. Biometrics allows to login to the admin panel using such technologies as Apple FaceID, Apple TouchID, Android Fingerprint, Windows Hello, Password Managers with Passkey support, etc.
Pre-requirements
Your admin panel should use HTTPS scheme only. Even the localhost.
Installation
Use composer to install MoonShine Passkeys package:
composer require jampire/moonshine-passkeys --with-all-dependencies php artisan migrate
Publish a config file:
php artisan vendor:publish --provider="Jampire\MoonshinePasskeys\PasskeyServiceProvider" --tag=config
This package is designed to work in MoonShine only. You first need to install it. Please read the documentation on how to install and configure MoonShine.
Compatibility
| MoonShine | MoonShine Passkeys | Currently supported |
|---|---|---|
| >= v4.0 | >= v0.1 | yes |
Configuration
Auto-installer is coming soon...
The most critical config option is passkeys.rp_id. It should match the base URL your Admin Panel is running on.
Passkeys are working with MoonShine User model. It should implement
Jampire\MoonshinePasskeys\Models\Contracts\PasskeyContract interface.
- If you are already using the custom MoonShine User model, you need just to add PasskeyContract interface
and
Jampire\MoonshinePasskeys\Models\Concerns\HasPasskeystrait to your model. - If you are using default MoonShine User model, you need to create new model that extends MoonShine User model, and implement PasskeyContract interface:
<?php declare(strict_types=1); namespace App\Models; use Jampire\MoonshinePasskeys\Models\Concerns\HasPasskeys; use Jampire\MoonshinePasskeys\Models\Contracts\PasskeyContract; use MoonShine\Laravel\Models\MoonshineUser; final class Admin extends MoonshineUser implements PasskeyContract { use HasPasskeys; public function getTable(): string { return (new parent())->getTable(); } }
Then you need to tell MoonShine to use your new model:
// config/moonshine.php return [ // ... // Authentication and profile 'auth' => [ // ... 'model' => \App\Models\Admin::class, // ... ], // ... ];
Next step is to tell MoonShine to use LoginForm provided by this package:
// config/moonshine.php return [ // ... // Authentication and profile 'forms' => [ // ... 'login' => \Jampire\MoonshinePasskeys\Components\LoginForm::class, // ... ], // ... ];
It replaces the standard MoonShine Login form. For now, it doesn't support Authentication pipelines.
Please review config/passkeys.php. All important options are described there.
Usage
Passkey component is installed in the user's profile page (admin/page/profile-page by default):
Here is an example of how the package works on MacBook with iCloud Keychain and Conditional UI enabled:
By default, to be able to login with traditional password, you need to type your email and click Login button.
The password field will appear. Type the password and click Login button again.
More detailed documentation is coming soon...
Contributing
Thank you for considering contributing to MoonShine Passkeys project! You can read the contribution guide here.
Code of Conduct
Please review and abide by the Code of Conduct.
Credits
License
MoonShine Passkeys is open-sourced software licensed under the MIT license.
jampire/moonshine-passkeys 适用场景与选型建议
jampire/moonshine-passkeys 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 04 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「authorization」 「security」 「Authentication」 「laravel」 「biometric」 「webauthn」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jampire/moonshine-passkeys 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jampire/moonshine-passkeys 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jampire/moonshine-passkeys 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Ory-Hydra OAuth 2.0 Client Provider for The PHP League OAuth2-Client
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Provide a way to secure accesses to all routes of an symfony application.
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 40
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-04

