zenosyne / filament-enterprise-grecaptcha-field
Provides a Google Enterprise reCaptcha field for the Filament Forms
v1.0.2
2023-04-05 08:38 UTC
Requires
- php: ^8.0|^8.1
- filament/forms: ^2.16
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.13.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
README
Provides a Google reCaptcha Enterpise for the Filament Login page.
Installation
You can install the package via composer:
composer require zenosyne/filament-enterprise-grecaptcha-field
Configuration
Add these in your .env
file :
GOOGLE_RECAPTCHA_PROJECT_ID=
GOOGLE_RECAPTCHA_API_KEY=
GOOGLE_RECAPTCHA_SITE_KEY=
(You can obtain them from here)
Usage
You'll need to create a filament page for your login which extends the original Filament login controller and add the field.
<?php namespace App\Filament\Pages; use Filament\Http\Livewire\Auth\Login as BaseLoginPage; use Zenosyne\FilamentEnterpriseGRecaptchaField\Forms\Components\GRecaptcha; class Login extends BaseLoginPage { protected function getFormSchema(): array { $formSchema = parent::getFormSchema(); $formSchema[] = GRecaptcha::make('g-recaptcha'); return $formSchema; } }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you discover any security related issues, please create an issue.
License
The MIT License (MIT). Please see License File for more information.