digifactory/filament-wildcard-login 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

digifactory/filament-wildcard-login

最新稳定版本:v2.0.0

Composer 安装命令:

composer require digifactory/filament-wildcard-login

包简介

Allow all e-mail addresses for a specific domain name to login to a generic account for that domain.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to allow users with an e-mail address ending in specific domain names to login using an e-mail instead of using a password. After installing this package you can have a generic account (e.g. helpdesk@digifactory.nl) and everyone using a @digifactory.nl mail address can login using the e-mail sent directly to their inbox.

Since v1.0.3 it is also possible to enable e-mail login for all users. When enabled ($plugin->allowAllDomains()) the plugin will look for that specific user/e-mail address instead of a specific domain. This option can be enabled on top of the base functionality of this package.

Version Filament version
v1.0 v3.0
v2.0 v4.0

Installation

You can install the package via composer:

composer require digifactory/filament-wildcard-login

Usage

You can add the FilamentWildcardLoginPlugin to your Filament Panel like this:

->plugins([
    FilamentWildcardLoginPlugin::make()
        ->domains([
            'digifactory.nl',
        ])
        ->loginDirectlyWithoutSendingEmail(app()->environment('local')),
])

These methods are available on the FilamentWildcardLoginPlugin instance:

Method Description
enabled(Closure | bool $value = true) This method allows you to enable the plugin using a boolean or callback, by default the plugin is enabled.
loginDirectlyWithoutSendingEmail(Closure | bool $value = true) This method allows you to enable direct login, without sending the e-mail. This can be handy for local development.
domains(array $domains) This method allows you to define the domains that can login using the e-mail link.
model(string $modelClass, string $modelColumn = 'email') This method allows you to define the used User model and column, by default the plugin users App\Model\User and email.
emailValidForMinutes(int $minutes) This method allows you to define after how many minutes the link in the e-mail should expire. The default is 5 minutes.
allowAllDomains(Closure | bool $value = true) This method allows you to allow all e-mail address to login using an e-mail.

Preview

preview preview-email

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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-22