-
Notifications
You must be signed in to change notification settings - Fork 41
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
Don't require RECAPTCHA_PRIVATE_KEY to be set if RECAPTCHA_DISABLE is set #8
Comments
The scope of RECAPTCHA_DISABLE is only for testing purpose and RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY are mandatory if you want to use django-recaptcha3. Why you need to use RECAPTCHA_DISABLE outside automated tests? |
Hello, thank you for the quick response. I do have |
If you check how the widget is made, also if you can set an empty Change the code to disable the recaptcha at all outside automated tests is too much invasive also because you can always create a set of public/secret keys for your test env from the recaptcha website. Another solution (but it is invasive I think) is to rework your project in order to add the support for the recaptcha in your forms dynamically based on your env. Let me know if one of those two alternatives suits your needs. |
Hello, thanks again for the quick response. I am not trying to disable recaptcha outside of the automated test environment.
Outside of automated tests, recaptcha is working correctly. |
If you use
It is not enough? |
Yes, that does work, and that is what I did before I created this issue. (Although I used None instead of 'dummy', but the effect is the same). My purpose in creating this issue was to propose changing this behavior: to stop requiring that the keys be defined only when RECAPTCHA_DISABLE is set. Thank you! |
Currently, RECAPTCHA_PRIVATE_KEY has to be defined, even when RECAPTCHA_DISABLE is set, otherwise this stack trace happens:
This applies to RECAPTCHA_PUBLIC_KEY, but a different stack trace:
The text was updated successfully, but these errors were encountered: