-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReCaptcha Version 3 #218
Comments
The server-side code for verifying the CAPTCHA (as well as the frontend This PHP code from this package's README shows how to manually implement v2 frontend code: <div id="recaptcha-container"></div>
<script type="text/javascript">
$(document).ready(function() {
$.getScript("<?php echo \EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType::RECAPTCHA_API_JS_SERVER ?>", function() {
Recaptcha.create("<?php echo $form['recaptcha']->get('public_key') ?>", "recaptcha-container", {
theme: "clean",
});
});
};
</script> I'm guessing v3 would be something like this: <script src="<?php echo \EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType::RECAPTCHA_API_JS_SERVER ?>?render=<?php echo $form['recaptcha']->get('public_key') ?>"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('<?php echo $form['recaptcha']->get('public_key') ?>', {action: 'homepage'}).then(function(token) {
...
});
});
</script> NOTE: The above code is entirely untested but might be enough to get you started 🙂 |
maybe adding a additional configuration with version could be added: ewz_recaptcha:
version: 'v3' # defaults to v2 so the backward compatibility is given? |
So... is it possible to simply do:
|
any updates regarding this? |
I'm also interested in this feature. |
I made simple bundle for reCAPTHCA v3 if someone want to use |
I'm intersting but i need to use it on an old symfony version (2.7). Is it compatible ? |
I've tried suggestion from @alexander-schranz
But this option does not exists in current version 1.5:
Any ideas? |
@itinance it was idea only. As I wrote above I made simple bundle for Recaptcha V3: https://github.com/prugala/PRRecaptchaBundle |
Is possible to use the ReCaptcha version 3 and if yes how to use it?
The text was updated successfully, but these errors were encountered: