New Captcha Package added
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user