Page MenuHomePhabricator

Implement a generic Captcha class for Javascript-based Captcha
Open, Needs TriagePublic

Description

Currently hCaptcha and reCaptcha have a lot of duplicated code that are unnecessary.
Instead, those code can be merged into a class and let hCaptcha and reCaptcha extend them.

This will reduce the maintenance needed for those extensions, and also allow easier implementation for other script-based Captcha, like SliderCaptcha (T273572) and Turnstile (T319068).

See also: T208829: Implement support for new Google ReCaptcha v3

Event Timeline

I can work on a patch to merge hCaptcha and reCaptcha in its current state, but I wanted to gather some feedbacks on the topic before I proceed.