定制 codebarista/nova-webauthn 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

codebarista/nova-webauthn

最新稳定版本:3.1.0

Composer 安装命令:

composer require codebarista/nova-webauthn

包简介

Authenticate Nova users with Passkeys.

README 文档

README

Laragear WebAuthn implementation for Laravel Nova to authenticate users with passkeys: fingerprints, patterns and biometrics.

Laravel Nova Passkey Login

1. Installation

composer require codebarista/nova-webauthn

2. Setup

Run the following command to publish and run the Laragear WebAuthn migrations.

php artisan codebarista:webauthn-setup

3. Implementation

Add the WebAuthnAuthenticatable contract and the WebAuthnAuthentication trait to the User class, or any other that uses authentication.

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Laragear\Webauthn\Contracts\WebAuthnAuthenticatable;
use Laragear\Webauthn\WebAuthnAuthentication;

class User extends Authenticatable implements WebAuthnAuthenticatable
{
    use WebAuthnAuthentication;

    // ...
}

Finally, add the NovaWebauthn registration form to the fields array of the Nova User Resource.

namespace App\Nova;

use Codebarista\NovaWebauthn\NovaWebauthn;
use Laravel\Nova\Http\Requests\NovaRequest;

class User extends Resource
{
    public function fields(NovaRequest $request): array
    {
        return [
            // ...
            NovaWebauthn::make(),
        ];
    }
}

Note: Make sure that passkey registration and login are done via a secure https connection.

Laravel Nova Passkey Registration

License

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

统计信息

  • 总下载量: 68
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-10