承接 geof-dev/filament-web3-auth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

geof-dev/filament-web3-auth

最新稳定版本:v1.2.0

Composer 安装命令:

composer require geof-dev/filament-web3-auth

包简介

Web3 wallet authentication plugin for Filament

README 文档

README

Latest Version on Packagist Total Downloads

A Filament v4 plugin for Web3 wallet authentication (MetaMask, and other EIP-1193 compatible wallets).

Filament Web3 Auth

Features

  • Login with crypto wallet (MetaMask, etc.)
  • Auto-register new users on first wallet login
  • Link/unlink wallet to existing accounts
  • Multi-network token dashboard (Ethereum, Polygon, Arbitrum, Base, Sepolia)
  • Fully customizable and translatable

Installation

Install the package via Composer:

composer require geof-dev/filament-web3-auth

Publish and run the migration:

php artisan vendor:publish --tag="filament-web3-auth-migrations"
php artisan migrate

Optionally publish the config file:

php artisan vendor:publish --tag="filament-web3-auth-config"

Optionally publish the views:

php artisan vendor:publish --tag="filament-web3-auth-views"

Add the plugin's views to your Filament theme CSS file (e.g., resources/css/filament/admin/theme.css):

@source '../../../../vendor/geof-dev/filament-web3-auth/resources/views/**/*.blade.php';

Then rebuild your assets:

npm run build

Usage

Register the plugin in your Filament panel provider:

use GeofDev\FilamentWeb3Auth\FilamentWeb3AuthPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(
            FilamentWeb3AuthPlugin::make()
                ->autoRegister(true)      // Auto-create users on first login
                ->showOnLogin(true)       // Show button on login page
        );
}

Plugin Options

Method Description Default
autoRegister(bool) Auto-create users on wallet login false
showOnLogin(bool) Show connect button on login page true
signatureMessage(string) Custom signature message template Config value

Configuration

// config/filament-web3-auth.php

return [
    'enabled' => env('FILAMENT_WEB3_AUTH_ENABLED', true),
    'auto_register' => env('FILAMENT_WEB3_AUTH_AUTO_REGISTER', true),
    'signature_message' => 'Sign this message to authenticate with :app_name. Nonce: :nonce',
    'user_model' => null, // Uses default auth model
    'route_prefix' => 'web3-auth',
    'middleware' => ['web'],
    'auth_middleware' => ['web', 'auth'],
];

User Model Setup

Ensure your User model has the eth_address column fillable:

protected $fillable = [
    'name',
    'email',
    'password',
    'eth_address',
];

Adding Wallet Manager to Profile

The easiest way is to use the plugin's EditProfile page in your panel:

use GeofDev\FilamentWeb3Auth\Pages\Auth\EditProfile;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->profile(EditProfile::class);
}

Or add the component manually to your custom profile page:

use Filament\Schemas\Components\View;

View::make('filament-web3-auth::components.wallet-manager')

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固