feat: add Cloudflare Turnstile as alternative captcha provider - #2499
Open
kwitykwity wants to merge 1 commit into
Open
feat: add Cloudflare Turnstile as alternative captcha provider#2499kwitykwity wants to merge 1 commit into
kwitykwity wants to merge 1 commit into
Conversation
…project#1461) Add support for Cloudflare Turnstile as a privacy-friendly alternative to Google reCAPTCHA for the signup form. Changes: - Add django-cf-turnstile dependency - Replace USE_RECAPTCHA boolean with CAPTCHA_PROVIDER setting ('recaptcha', 'turnstile', or 'none') - Add CF_TURNSTILE_SITE_KEY and CF_TURNSTILE_SECRET_KEY settings - Update signup form to conditionally use either provider - Add Django checks to validate captcha configuration - Maintain backwards compatibility with USE_RECAPTCHA=True - Update CHANGELOG.md Fixes wger-project#1461 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for Cloudflare Turnstile as a privacy-friendly alternative to Google reCAPTCHA for the signup form.
CAPTCHA_PROVIDERwith options:'recaptcha','turnstile', or'none'USE_RECAPTCHA=Trueconfigurations continue to workChanges
django-cf-turnstiledependencyCAPTCHA_PROVIDERsetting to replace booleanUSE_RECAPTCHACF_TURNSTILE_SITE_KEYandCF_TURNSTILE_SECRET_KEYsettingsConfiguration
Related Issue(s)
Fixes #1461
Please check that the PR fulfills these requirements
ruff format && isort .)CHANGELOG.mdTesting
DJANGO_SETTINGS_MODULE=settings.ci python manage.py test wger.core.tests.test_registrationAll 12 tests pass.
🤖 Generated with Claude Code