-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added recaptcha verification pipeline step #7
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
Conversation
e13e90c
to
55edab2
Compare
chore: recompiled reqirements feat: added new field to validate and expose captcha field chore: added edx-filters-pipelines in private requirements chore: recompiled reqirements chore: recompiled reqirements chore: recompiled reqirements
09aa440
to
40f9f94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces reCAPTCHA validation for user registration using Google Cloud's reCAPTCHA Enterprise SDK. The implementation includes a new registration form field for CAPTCHA tokens, a filter pipeline step to verify tokens during registration, and supporting configuration via Django settings and waffle flags.
- Added
CaptchaForm
to expose acaptcha_token
field for registration with dynamic enable/disable capability - Implemented
VerifyReCaptchaToken
pipeline step for token verification during registration - Created utilities for reCAPTCHA verification using Google Cloud SDK with platform-specific site keys and error handling
Reviewed Changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
requirements/base.in | Added new dependencies for reCAPTCHA functionality |
requirements/*.txt | Auto-generated dependency files reflecting new packages |
edx_filters_pipelines/waffle.py | Added waffle flag for enabling/disabling reCAPTCHA validation |
edx_filters_pipelines/auth/utils.py | Core reCAPTCHA verification logic using Google Cloud SDK |
edx_filters_pipelines/auth/pipelines/registration.py | Pipeline step for reCAPTCHA token verification during registration |
edx_filters_pipelines/auth/form.py | Registration form extension with CAPTCHA token field |
edx_filters_pipelines/init.py | Version bump to 1.1.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This pull request introduces reCAPTCHA validation for user registration in the
edx_filters_pipelines
package. The main changes include adding a new registration form field for the CAPTCHA token, implementing a filter pipeline step to verify the token using Google Cloud's reCAPTCHA Enterprise SDK, and supporting configuration via Django settings and waffle flags. Several new dependencies are added to enable this functionality.New reCAPTCHA registration feature:
CaptchaForm
inedx_filters_pipelines/auth/form.py
to expose acaptcha_token
field for registration, allowing dynamic enable/disable via settings.VerifyReCaptchaToken
pipeline step inedx_filters_pipelines/auth/pipelines/registration.py
to verify the reCAPTCHA token during registration, raising a validation error if verification fails.edx_filters_pipelines/auth/utils.py
with theRecaptchaVerifier
class and utility functions to verify tokens using the Google Cloud SDK, supporting platform-specific site keys and handling errors gracefully.Feature toggling and configuration:
ENABLE_RECAPTCHA_VALIDATION
waffle flag inedx_filters_pipelines/waffle.py
to allow dynamic enabling/disabling of reCAPTCHA validation.Version bump:
1.1.0
inedx_filters_pipelines/__init__.py
to reflect new feature addition.