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

View File

@@ -7,7 +7,8 @@ export const authSchema = z.object({
.regex(/^[a-zA-Z0-9_-]+$/, "用户名只能包含字母、数字、下划线和横杠")
.refine(val => !val.includes('@'), "用户名不能是邮箱格式"),
password: z.string()
.min(8, "密码长度必须大于等于8位")
.min(8, "密码长度必须大于等于8位"),
turnstileToken: z.string().optional()
})
export type AuthSchema = z.infer<typeof authSchema>
export type AuthSchema = z.infer<typeof authSchema>