Add support for hCaptcha

This commit is contained in:
Acid Chicken (硫酸鶏)
2020-04-28 14:29:33 +09:00
parent e17e8bbb6f
commit 7860839220
15 changed files with 257 additions and 20 deletions

9
src/@types/hcaptcha.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
declare module 'hcaptcha' {
export function verify(secret: string, token: string): Promise<{
success: boolean;
challenge_ts: string;
hostname: string;
credit?: boolean;
'error-codes'?: unknown[];
}>;
}