Comments (8)
With current recaptcha implementation we cannot add it to widget from Content->Pages, only from configuration for specific controllers
Mark this issue as Feature Request for further discussion
from security-package.
small preemptive clarification: on the /contact/index/index/ contact form itself, the recaptcha is working properly.
from security-package.
Hello @heldchen ,
the reCaptcha is injected via layout (see view/frontend/layout/contact_index_index.xml
in the module).
So basically it will not be injected when directly using the contact form as a block. In this case I think you will need to use a custom phtml file like the following:
<div
class="field-recaptcha"
id="<?= /* @noEscape */ $block->getRecaptchaId() ?>-container"
data-bind="scope:'<?= /* @noEscape */ $block->getRecaptchaId() ?>'"
>
<!-- ko template: getTemplate() --><!-- /ko -->
</div>
<script type="text/x-magento-init">
{
"#<?= /* @noEscape */ $block->getRecaptchaId() ?>-container": {
"Magento_Ui/js/core/app": {
"components":{
"<?= /* @noEscape */ $block->getRecaptchaId() ?>":{
"component": "MSP_ReCaptcha\/js\/reCaptcha",
"zone": "create",
"settings": {
"siteKey": "<?= /* @noEscape */ $block->getPublicKey() ?>",
"size": "invisible",
"badge": "bottomright",
"theme": null,
"lang": null,
"enabled": {
"contact":true
}
},
"reCaptchaId":"<?= /* @noEscape */ $block->getRecaptchaId() ?>"
}
}
}
}
}
</script>
NOTE: I did not test it, so make a try before, you may need to adjust something.
from security-package.
@phoenix128 I know (and we have implemented it in a similar way), but ideally this should be injected by the recaptcha module into the contactform widget itself for everyone to use properly without having to manually reconstruct the initialization logic - after all, it currently breaks any page that has the core contact form widget in cms page and recaptcha enabled.
from security-package.
@magento export issue to Jira project MC as Story
from security-package.
from security-package.
There were some pre-requisites to this internally. This issue is currently pending a discussion.
from security-package.
We have ultimately decided not to work on this issue internally right now due to scheduling and commitment reasons. We may decide to do this in the future but for now we will close this issue. You are welcome to open a PR to fix this issue in which case I will happily reopen this.
from security-package.
Related Issues (20)
- Email notification for 2FA configuration has a wrong link, which leads to 404 page HOT 3
- invisible recaptcha v3 validation does not validate score_threshold set in admin config HOT 1
- Allow use reCAPTCHA globally HOT 6
- Mark interfaces and blocks as API HOT 6
- Newly created admin users are unable to pass Two-Factor Authentication HOT 4
- Not able to use captcha multiple times in same page HOT 7
- Admin user 2FA provider preference not saving HOT 12
- Unable to Plugin to \Magento\TwoFactorAuth\Observer\ControllerActionPredispatch HOT 4
- Remove 2FA Force Provider "Use system value" checkbox HOT 3
- Disable 2fa auth for specifi user HOT 2
- ReCaptcha checkout config provider name conflicts with Braintree HOT 6
- Authy Remember Me Option HOT 1
- Errors with bulk API when ReCaptchaWebapiRest is enabled HOT 8
- test HOT 5
- Publish a new release of TwoFactorAuth extension HOT 2
- I have got an issue on admin frequently "You cannot proceed with such operation, your reCaptcha reputation is too low. HOT 6
- Duplicate reCAPTCHA validation breaks checkout success redirect after initial server error response HOT 6
- Wrong version in 1.1.3-p1 metapackage composer.json HOT 4
- Missing LESS guards create duplicate CSS HOT 6
- The Magento works with Google reCaptcha v3 incorrectly. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from security-package.