diff --git a/.env.example b/.env.example index 074ba148..21e18924 100644 --- a/.env.example +++ b/.env.example @@ -82,3 +82,6 @@ TWITTER_CONSUMER_KEY=your-consumer-key TWITTER_CONSUMER_SECRET=your-consumer-secret TWITTER_ACCESS_TOKEN=your-accesss_token TWITTER_ACCESS_SECRET=your-access-token-secret + +GOOGLE_RECAPTCHA_SITE_KEY=your-recaptcha-site-key +GOOGLE_RECAPTCHA_SECRET_KEY=your-secret-key diff --git a/composer.json b/composer.json index 7cc0c79f..e873720f 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ "blade-ui-kit/blade-heroicons": "^2.4", "cyrildewit/eloquent-viewable": "^7.0", "doctrine/dbal": "^3.6.4", + "dutchcodingcompany/livewire-recaptcha": "^1.0", "filament/filament": "^3.2", "filament/notifications": "^3.2", "filament/spatie-laravel-media-library-plugin": "^3.2", diff --git a/composer.lock b/composer.lock index 4d3feafe..6996775e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3dc875bd992bababfd251046188eda5b", + "content-hash": "9fb85f783f1b990bd74f6830c11935e4", "packages": [ { "name": "abraham/twitteroauth", @@ -2434,6 +2434,62 @@ ], "time": "2024-10-09T13:47:03+00:00" }, + { + "name": "dutchcodingcompany/livewire-recaptcha", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/DutchCodingCompany/livewire-recaptcha.git", + "reference": "cdf2629c31d237ade99c41f3c6f8296207672246" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DutchCodingCompany/livewire-recaptcha/zipball/cdf2629c31d237ade99c41f3c6f8296207672246", + "reference": "cdf2629c31d237ade99c41f3c6f8296207672246", + "shasum": "" + }, + "require": { + "livewire/livewire": "^3.0", + "php": "^8.2" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.8", + "larastan/larastan": "^2.9", + "orchestra/testbench": "^9.0", + "phpunit/phpunit": "^11.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "DutchCodingCompany\\LivewireRecaptcha\\LivewireRecaptchaServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "DutchCodingCompany\\LivewireRecaptcha\\": "src/", + "DutchCodingCompany\\LivewireRecaptcha\\Tests\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Add Google Recaptcha V3 support to your Laravel Livewire components", + "homepage": "https://github.com/dutchcodingcompany/livewire-recaptcha", + "keywords": [ + "Google ReCaptcha", + "dutchcodingcompany", + "laravel", + "livewire" + ], + "support": { + "issues": "https://github.com/DutchCodingCompany/livewire-recaptcha/issues", + "source": "https://github.com/DutchCodingCompany/livewire-recaptcha/tree/1.0.0" + }, + "time": "2024-06-04T15:07:32+00:00" + }, { "name": "egulias/email-validator", "version": "4.0.2", diff --git a/config/services.php b/config/services.php index 032a45b8..1fa5e6f3 100644 --- a/config/services.php +++ b/config/services.php @@ -61,4 +61,13 @@ 'channel' => env('TELEGRAM_CHANNEL'), ], + 'google' => [ + 'recaptcha' => [ + 'site_key' => env('GOOGLE_RECAPTCHA_SITE_KEY'), + 'secret_key' => env('GOOGLE_RECAPTCHA_SECRET_KEY'), + 'version' => 'v3', + 'score' => 0.5, + ], + ], + ]; diff --git a/resources/views/livewire/pages/auth/register.blade.php b/resources/views/livewire/pages/auth/register.blade.php index bd167989..94ef6b60 100644 --- a/resources/views/livewire/pages/auth/register.blade.php +++ b/resources/views/livewire/pages/auth/register.blade.php @@ -1,18 +1,20 @@ validate([ @@ -85,14 +87,18 @@ public function register(): void
-

{{ __('pages/auth.register.advantages.quote') }}

- "The Pragmatic Programmer" {{ __('pages/auth.register.advantages.quote_authors') }} + "The Pragmatic Programmer" {{ __('pages/auth.register.advantages.quote_authors') }}

@@ -114,7 +120,7 @@ public function register(): void -
+
- {{ __('pages/auth.register.submit') }}
+ @livewireRecaptcha @include('partials._socials-link')