Problem/Motivation
There is currently no option in the configuration page to select project id and score to support Enterprise invisible Captcha
There should be option to support Enterprise reCAPTCHA
Steps to reproduce
Navigate to admin/config/people/captcha/recaptcha
add v3 captcha and use enterprise key captcha will not come and validate
Proposed resolution
I am attaching all patch file to supporting Enterprise reCAPTCHA apply this patch and test
Add a checkbox in the config page with label: Use Enterprise JS and a textfield for the Enterprise Project ID.
This will determine the Javascript API to be loaded - https://www.google.com/recaptcha/api.js for Free version; https://www.google.com/recaptcha/enterprise.js for Enterprise version. Project ID is the ID of the Google Cloud project for which the reCAPTCHA_V3 Enterprise API is enabled.
Remaining tasks
User interface changes
after create field we need to provide project id and set score 0.5
Introduced terminology
API changes
api url change https://www.google.com/recaptcha/enterprise.js
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | combine_add-support-invisible-recaptcha-enterprise-recaptcha_v3-3544777.patch | 9.46 KB | imran2734 |
Comments
Comment #2
imran2734 commentedComment #3
imran2734 commentedComment #4
avpadernoSince patches are no longer tested, a merge request needs to be provided.
Comment #5
imran2734 commentedupdate patch with all file and tested it is working for me
Comment #6
dench0@imran2734
Why do we need this new setting:
recaptcha_is_human_score? It looks like we already have it in the action config.Comment #7
dench0And possibly better to use the official Google package instead of the custom
Enterpriseclass: https://github.com/googleapis/google-cloud-php-recaptcha-enterpriseComment #8
imran2734 commentedyes we can use
Comment #9
imran2734 commentedusing custom enterprise.php file we are calling rest api if i will use library https://github.com/googleapis/google-cloud-php-recaptcha-enterprise it is asking some json file i need to upload in my directory we don't want to upload any json file .
Comment #10
dench0That library can fetch the API key from different locations: like JSON file, ENV variable...
You can find an example of passing the API key by this link https://cloud.google.com/recaptcha/docs/create-assessment-website#create...
Comment #11
imran2734 commentedMultiple approach is there so I am going with this approach POST https://recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assess...
Here we need to pass project id and API_KEY to get validate token response,.
We’ll continue monitoring the official package for future improvements, but for now, our custom implementation meets the project’s requirements without introducing additional credential handling overhead.
Comment #12
ericvlIMHO, I think both of this and this issue are duplicates of eachother. Look to the steps that are allready made in the other issue.
Comment #13
imran2734 commentedyes both issue is same but here i am providing complete patch file
Comment #14
imran2734 commentedComment #15
avpadernoPatches are no longer tested; they should no longer be provided. drupal.org now uses merge requests, which is provided by the other issue.
It is useless to have two issues for the same task.
Comment #16
avpadernoThis issue can now be closed as duplicate of #3500825: Add support for reCAPTCHA Enterprise.