Skip to content

Friendly captcha - #6546

Open
ukutaht wants to merge 11 commits into
masterfrom
friendly-captcha
Open

Friendly captcha#6546
ukutaht wants to merge 11 commits into
masterfrom
friendly-captcha

Conversation

@ukutaht

@ukutaht ukutaht commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Changes

Replaces hCaptcha with invisible Friendly Captcha. Due to the 'invisible' part, some frontend complexity is necessarily added.

NB ⚠️ Do not merge. Requires Friendly Captcha credentials to be set up on prod before deploying.

Tests

This part is manually tested.

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode

ukutaht and others added 8 commits July 22, 2026 17:51
Switch the registration and password-reset bot protection from hCaptcha
to Friendly Captcha v2 for its privacy-first, adaptive (Smart mode)
challenge model that lets legitimate users pass without interaction.

- Verify solutions server-side against the global siteverify endpoint
  using X-API-Key header auth and a JSON body.
- Configure via FRIENDLY_CAPTCHA_SITEKEY and FRIENDLY_CAPTCHA_API_KEY.
- Gate the form submit button until the widget completes (re-disabling
  on error/expire), as recommended by Friendly Captcha.
Drop the per-form attribution slot and render a single shared attribution inside the widget component, simplifying both call sites.
@github-actions

Copy link
Copy Markdown
Preview environment👷🏼‍♀️🏗️
PR-6546

@ukutaht
ukutaht requested a review from a team July 28, 2026 09:35
@ukutaht
ukutaht marked this pull request as ready for review July 28, 2026 09:36
Comment thread lib/plausible_web/components/captcha.ex Outdated
phx-update={if @live?, do: "ignore"}
id="frc-captcha-script"
type="module"
src="https://cdn.jsdelivr.net/npm/@friendlycaptcha/sdk@1/site.min.js"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks 5084688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants