Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ This project supports AI-based features using OpenAI.
```bash
ddev terminus secret:site:set gizra-drupal-starter openai_api_key your-key-here --type=runtime --scope=web,user
```
## reCAPTCHA Configuration

1. Create a site in [Google reCAPTCHA](https://www.google.com/recaptcha/admin/create).
2. Add the required domains, then retrieve the site key and secret key from the reCAPTCHA settings.
3. Add these keys to the reCAPTCHA configuration at:
`/admin/config/people/captcha/recaptcha`
4. Save the configuration.

Note: reCAPTCHA will not work without these keys.

## PHPCS (Code Sniffer)

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"drupal/pluggable_entity_view_builder": "^1.1",
"drupal/quickedit": "^1.0",
"drupal/real_aes": "^2.5",
"drupal/recaptcha": "^3.4",
"drupal/redirect": "^1.6",
"drupal/redis": "^1.7",
"drupal/rollbar": "^2.1",
Expand Down
225 changes: 223 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
uuid: 99f9c715-53d9-4827-946d-736516318f9a
langcode: en
status: false
dependencies: { }
_core:
default_config_hash: 7zUmOK1ti1l0bc78ieysHa3_57MOin7IgHpHhwbSugs
formId: contact_message_personal_form
captchaType: default
label: contact_message_personal_form
7 changes: 7 additions & 0 deletions config/sync/captcha.captcha_point.node_landing_page_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
uuid: c64bd524-122c-40e1-98cc-43de63f68573
langcode: en
status: false
dependencies: { }
formId: node_landing_page_form
captchaType: default
label: node_landing_page_form
7 changes: 7 additions & 0 deletions config/sync/captcha.captcha_point.node_news_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
uuid: 6016d008-b564-453b-92e3-ebd16b05a040
langcode: en
status: false
dependencies: { }
formId: node_news_form
captchaType: default
label: node_news_form
9 changes: 9 additions & 0 deletions config/sync/captcha.captcha_point.user_login_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
uuid: b2d8eaea-c507-4f86-9b86-74078dbb024e
langcode: en
status: false
dependencies: { }
_core:
default_config_hash: XbughDuwgOtc_8ztmYxz84gaXBeR760xH3bGSKD9v1Q
formId: user_login_form
captchaType: default
label: user_login_form
9 changes: 9 additions & 0 deletions config/sync/captcha.captcha_point.user_pass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
uuid: 94c9d6b9-b605-454e-972f-247394f5d810
langcode: en
status: false
dependencies: { }
_core:
default_config_hash: qZeHI5fZ9WQRKsfl8FMBwzk3puSsWCRtWKEZh04JJUo
formId: user_pass
captchaType: default
label: user_pass
9 changes: 9 additions & 0 deletions config/sync/captcha.captcha_point.user_register_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
uuid: 330e1fc9-9804-4d04-acb5-dbd56818c8e7
langcode: en
status: false
dependencies: { }
_core:
default_config_hash: 2iz3cMg7T1eSKXtNIB9WyaRptfg7wosDDPBSBhXFXl0
formId: user_register_form
captchaType: default
label: user_register_form
16 changes: 16 additions & 0 deletions config/sync/captcha.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
_core:
default_config_hash: hfqTr6E3eXAcVQU25_tYHa4BzsSDaYhwkoF34xq5_k4
langcode: en
enable_globally: 0
enable_globally_on_admin_routes: false
default_challenge: recaptcha/reCAPTCHA
description: 'This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.'
title: ''
administration_mode: false
administration_mode_on_admin_routes: false
whitelist_ips: ''
wrong_captcha_response_message: 'The answer you entered for the CAPTCHA was not correct.'
default_validation: 1
persistence: 1
enable_stats: false
log_wrong_responses: false
2 changes: 2 additions & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module:
block_content: 0
block_plugin_view_builder: 0
breakpoint: 0
captcha: 0
ckeditor5: 0
config: 0
config_filter: 0
Expand Down Expand Up @@ -78,6 +79,7 @@ module:
pluggable_entity_view_builder: 0
quickedit: 0
real_aes: 0
recaptcha: 0
redirect: 0
redis: 0
responsive_image: 0
Expand Down
11 changes: 11 additions & 0 deletions config/sync/recaptcha.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
_core:
default_config_hash: ByOVf1cU9r5NkZ4ieBJ7k9sUid6jb03ojMN1gjJ0-OU
site_key: ''
secret_key: ''
Comment on lines +3 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it require the key to work?
Will it work on different envs (local/ QA/ TEST/ LIVE)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitaibu Yes, it requires a key to work. Also, we can add multiple domains to the same site setup in reCAPTCHA, so it doesn’t require separate keys for each environment.

Screenshot 2025-07-28 at 5 55 41 PM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, then shouldn't we have the key as part of the config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I received a notification from GitGuardian that the reCAPTCHA key was exposed on GitHub. That’s why I removed it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry, this is the drupal-starter repo :)

Since it was already exposed on Git, you should revoke those keys and create new ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitaibu As per my understanding, no action is needed on this PR. I will proceed to revoke the site keys in reCAPTCHA.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update README, as Captcha won't work without the keys

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitaibu Updated README.md

TB: 0.15h(0.65h/1h)

verify_hostname: false
use_globally: false
widget:
theme: light
type: image
size: ''
noscript: false
Loading