承接 aurorawebsoftware/filament-loginkit 相关项目开发

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

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

aurorawebsoftware/filament-loginkit

Composer 安装命令:

composer require aurorawebsoftware/filament-loginkit

包简介

This is my package filament-loginkit

README 文档

README

A flexible authentication kit for Filament that brings enhanced two-factor authentication, SMS login, and customizable login flows to your Laravel applications.

Table of Contents

Installation

First, install the package via Composer:

composer require aurorawebsoftware/filament-loginkit

Then, run the install command to set up configuration, migrations, assets, and required dependencies:

php artisan filament-loginkit:install

Add the plugin to your PanelProvider:

plugin(FilamentLoginKitPlugin::make())

To require two-factor authentication for all users, use the forced() method:

plugin(FilamentLoginKitPlugin::make()->forced())

User Model Changes

Make sure your User model implements the necessary properties and traits:

<?php

use AuroraWebSoftware\FilamentLoginKit\Traits\TwoFactorAuthenticatable;

class User extends Authenticatable
{
    use TwoFactorAuthenticatable;

    protected $fillable = [
        'phone_number',
        'two_factor_type',
        'is_2fa_required',
        'sms_login_code',
        'sms_login_expires_at',
        'two_factor_code',
        'two_factor_expires_at',
        'is_active',
        'whatsapp_login_code',
        'whatsapp_login_expires_at'
    ];

    protected $casts = [
        'email_verified_at' => 'datetime',
        'password' => 'hashed',
        'sms_login_expires_at' => 'datetime',
        'is_2fa_required' => 'boolean',
        'two_factor_expires_at' => 'datetime',
        'is_active'=>'boolean'
        'whatsapp_login_expires_at' => 'datetime',
    ];
}

Configuration

After publishing the config file, you can find it at config/filament-loginkit.php.

Login Methods

Enable/disable email and SMS login:

'email_login' => env('LOGINKIT_EMAIL_LOGIN_ENABLED', true),

'sms_login' => env('LOGINKIT_SMS_LOGIN_ENABLED', false),

Two-Factor Authentication

Set available two-factor methods: authenticator, email, sms

'options' => [
    \AuroraWebSoftware\FilamentLoginKit\Enums\TwoFactorType::authenticator,
    \AuroraWebSoftware\FilamentLoginKit\Enums\TwoFactorType::email,
    \AuroraWebSoftware\FilamentLoginKit\Enums\TwoFactorType::sms,
],

Features

Enable or disable registration, multi-tenancy, or generic error messages:

'enabled_features' => [
    'register' => false,
    'multi_tenancy' => false,
    'generic_errors' => false,
],

SMS Service

To enable SMS authentication, you must implement your own SMS service using the provided interface.

You can find the interface at:

AuroraWebSoftware\FilamentLoginKit\Contracts\SmsServiceInterface

First, create a class that implements this interface. For example:

namespace App\Services;

use AuroraWebSoftware\FilamentLoginKit\Contracts\SmsServiceInterface;

class SmsService implements SmsServiceInterface
{
    public function sendSms(string $phone, string $message): void
    {
        // Your SMS sending logic here
    }
}

Then, register your service in the configuration file:

// config/filament-loginkit.php
'sms_service_class' => \App\Services\SmsService::class,

Note: Your SMS service must implement all methods required by SmsServiceInterface.

Rate Limits

Limit login and 2FA attempts to prevent abuse:

'rate_limits' => [
    'sms' => [
        'max_requests' => 5,
        'per_minutes' => 1,
    ],
    'sms_resend' => [
        'max_requests' => 2,
        'per_minutes' => 1,
    ],
    'login' => [
        'max_requests' => 5,
        'per_minutes' => 1,
    ],
    'two_factor' => [
        'max_requests' => 5,
        'per_minutes' => 1,
    ],
],

Queues

Set whether notifications are queued:

'queue_notifications' => env('LOGINKIT_QUEUE_NOTIFICATIONS', true),
'email_queue' => env('LOGINKIT_EMAIL_QUEUE', 'filament-loginkit'),
'sms_queue' => env('LOGINKIT_SMS_QUEUE', 'filament-loginkit'),

The queue name used by Filament Loginkit is filament-loginkit.

To start the queue worker in Laravel, run the following command:

php artisan queue:work --queue=filament-loginkit

And more! Please check the config/filament-loginkit.php file for the full list of options.

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.

aurorawebsoftware/filament-loginkit 适用场景与选型建议

aurorawebsoftware/filament-loginkit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 80 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「AuroraWebSoftware」 「filament-loginkit」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 aurorawebsoftware/filament-loginkit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aurorawebsoftware/filament-loginkit 我们能提供哪些服务?
定制开发 / 二次开发

基于 aurorawebsoftware/filament-loginkit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-03