zenosyne/filament-enterprise-grecaptcha-field

Provides a Google Enterprise reCaptcha field for the Filament Forms

v1.0.2 2023-04-05 08:38 UTC

This package is auto-updated.

Last update: 2024-04-06 05:34:44 UTC


README

1c426412-7b88-11e4-8d16-46161a081ece.gif

Provides a Google reCaptcha Enterpise for the Filament Login page.

Latest Version on Packagist Total Downloads

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.