New Captcha Package added

This commit is contained in:
2026-07-25 13:38:18 +05:30
parent d0aded0392
commit 8b728a3e5d
157 changed files with 12092 additions and 1913 deletions
@@ -0,0 +1,24 @@
import { SiteverifyCaptchaProvider, type SiteverifyProviderOptions } from "./siteverify.ts";
export class HcaptchaProvider extends SiteverifyCaptchaProvider {
constructor(options: SiteverifyProviderOptions) {
super(
{
name: "hcaptcha",
endpoint: "https://api.hcaptcha.com/siteverify",
client: {
responseField: "h-captcha-response",
scriptUrl: "https://js.hcaptcha.com/1/api.js?render=explicit",
widgetClass: "h-captcha",
},
sendSiteKey: true,
scoreDirection: "higher-is-risk",
},
options,
);
}
}
export function hcaptchaProvider(options: SiteverifyProviderOptions): HcaptchaProvider {
return new HcaptchaProvider(options);
}