feat(turnstile): integrate Cloudflare Turnstile for enhanced security in login and registration processes

This commit is contained in:
beilunyang
2025-10-22 23:31:48 +08:00
parent 1ffe920d47
commit e431c1fe5b
22 changed files with 480 additions and 56 deletions

10
types.d.ts vendored
View File

@@ -7,6 +7,14 @@ declare global {
SITE_CONFIG: KVNamespace;
}
interface Window {
turnstile?: {
render: (element: HTMLElement | string, options: Record<string, unknown>) => string
reset: (widgetId?: string) => void
remove: (widgetId: string) => void
}
}
type Env = CloudflareEnv
}
@@ -21,4 +29,4 @@ declare module "next-auth" {
}
}
export type { Env }
export type { Env }