Skip to content

Conversation

AhtishamShahid
Copy link
Collaborator

@AhtishamShahid AhtishamShahid commented Aug 25, 2025

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:

  • Added CaptchaForm in edx_filters_pipelines/auth/form.py to expose a captcha_token field for registration, allowing dynamic enable/disable via settings.
  • Implemented VerifyReCaptchaToken pipeline step in edx_filters_pipelines/auth/pipelines/registration.py to verify the reCAPTCHA token during registration, raising a validation error if verification fails.
  • Created edx_filters_pipelines/auth/utils.py with the RecaptchaVerifier 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:

  • Added ENABLE_RECAPTCHA_VALIDATION waffle flag in edx_filters_pipelines/waffle.py to allow dynamic enabling/disabling of reCAPTCHA validation.

Version bump:

  • Bumped package version to 1.1.0 in edx_filters_pipelines/__init__.py to reflect new feature addition.

@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 09:35
Copilot

This comment was marked as outdated.

@AhtishamShahid AhtishamShahid force-pushed the ahtisham/add-captcha-verification branch 2 times, most recently from e13e90c to 55edab2 Compare September 4, 2025 08:31
Copilot

This comment was marked as outdated.

Copilot

This comment was marked as outdated.

@AhtishamShahid AhtishamShahid changed the title feat: added recapthca verification pipeline step feat: added recaptcha verification pipeline step Sep 9, 2025
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
@AhtishamShahid AhtishamShahid force-pushed the ahtisham/add-captcha-verification branch from 09aa440 to 40f9f94 Compare September 9, 2025 05:58
Copy link
Contributor

@Copilot Copilot AI left a 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 a captcha_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.

@AhtishamShahid AhtishamShahid merged commit b911aab into main Sep 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants