Skip to content

Add recaptcha and re-enable public signups - #1581

Merged
danlamanna merged 1 commit into
masterfrom
add-recaptcha
Aug 13, 2026
Merged

Add recaptcha and re-enable public signups#1581
danlamanna merged 1 commit into
masterfrom
add-recaptcha

Conversation

@danlamanna

@danlamanna danlamanna commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added reCAPTCHA verification to the signup form.
    • Signup attempts now display validation feedback when verification fails.
    • Successful verification allows account creation.
  • Configuration

    • Production environments can use configured reCAPTCHA credentials.
    • Development and testing environments support reCAPTCHA test keys.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c1dc37fb-111a-4c95-af0c-1851662e0ce2

📥 Commits

Reviewing files that changed from the base of the PR and between 8af9197 and f8214d8.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • isic/login/forms.py
  • isic/login/templates/allauth/elements/fields.html
  • isic/login/tests/test_signup.py
  • isic/settings/base.py
  • isic/settings/development.py
  • isic/settings/production.py
  • isic/settings/testing.py
  • pyproject.toml

📝 Walkthrough

Walkthrough

The signup flow now uses a reCAPTCHA checkbox. Django settings provide the dependency, form configuration, environment keys, and test-key checks. Signup tests cover rendering, rejected invalid verification, and successful account creation.

Changes

Signup protection

Layer / File(s) Summary
reCAPTCHA dependency and settings
pyproject.toml, isic/settings/base.py, isic/settings/development.py, isic/settings/production.py, isic/settings/testing.py
The project adds django-recaptcha, registers it, loads production keys from environment variables, and silences test-key checks in development and testing.
Signup form and widget rendering
isic/login/forms.py, isic/login/templates/allauth/elements/fields.html, isic/settings/base.py
CaptchaSignupForm adds an ordered reCAPTCHA checkbox field. Allauth uses this form and renders the widget with validation errors.
Signup verification coverage
isic/login/tests/test_signup.py
The signup test checks widget rendering, invalid verification rejection, and account creation after valid verification.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to f8214

This change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant SignupPage
  participant CaptchaSignupForm
  participant django_recaptcha
  participant UserDatabase
  SignupPage->>CaptchaSignupForm: Submit signup fields and captcha
  CaptchaSignupForm->>django_recaptcha: Verify captcha response
  django_recaptcha-->>CaptchaSignupForm: Return verification result
  CaptchaSignupForm->>UserDatabase: Create account after valid verification
Loading

Suggested reviewers: brianhelba

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding reCAPTCHA and re-enabling public signups.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-recaptcha

Comment @coderabbitai help to get the list of available commands.

@danlamanna
danlamanna enabled auto-merge August 13, 2026 16:35
@danlamanna
danlamanna merged commit 8587670 into master Aug 13, 2026
2 checks passed
@danlamanna
danlamanna deleted the add-recaptcha branch August 13, 2026 16:41
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.

1 participant