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
+5 -2
View File
@@ -36,8 +36,11 @@
"loginFailedDesc": "Incorrect username or password",
"registerFailed": "Registration Failed",
"registerFailedDesc": "Please try again later",
"autoLoginFailed": "Auto-login failed, please login manually"
"autoLoginFailed": "Auto-login failed, please login manually",
"turnstileRequired": "Please complete the verification",
"turnstileRequiredDesc": "Solve the Turnstile challenge below before continuing",
"registerSuccess": "Registration Successful",
"registerSuccessDesc": "Switch to the login tab and complete verification to sign in"
}
}
}
+3 -2
View File
@@ -3,7 +3,9 @@
"title": "Insufficient Permission",
"description": "You don't have permission to access this page. Please contact the website administrator.",
"adminContact": "Admin Contact",
"backToHome": "Back to Home"
"backToHome": "Back to Home",
"needPermission": "需要公爵或更高权限才能管理 API Key",
"contactAdmin": "请联系网站管理员升级您的角色"
},
"layout": {
"myEmails": "My Emails",
@@ -165,4 +167,3 @@
}
}
}
+9 -1
View File
@@ -107,6 +107,15 @@
"adminContact": "Admin Contact",
"adminContactPlaceholder": "Email or other contact method",
"maxEmails": "Max Emails per User",
"turnstile": {
"enable": "Enable Cloudflare Turnstile",
"enableDescription": "When enabled, username/password login and registration require Turnstile verification",
"siteKey": "Site Key",
"siteKeyPlaceholder": "Enter Turnstile Site Key",
"secretKey": "Secret Key",
"secretKeyPlaceholder": "Enter Turnstile Secret Key",
"secretKeyDescription": "Set up a Turnstile application in Cloudflare and provide the required keys before enabling"
},
"save": "Save Configuration",
"saving": "Saving...",
"saveSuccess": "Configuration saved successfully",
@@ -128,4 +137,3 @@
"updateFailed": "Failed to update user role"
}
}
+5 -2
View File
@@ -36,8 +36,11 @@
"loginFailedDesc": "ユーザー名またはパスワードが正しくありません",
"registerFailed": "登録に失敗しました",
"registerFailedDesc": "しばらくしてからもう一度お試しください",
"autoLoginFailed": "自動ログインに失敗しました。手動でログインしてください"
"autoLoginFailed": "自動ログインに失敗しました。手動でログインしてください",
"turnstileRequired": "まず認証を完了してください",
"turnstileRequiredDesc": "続行する前に下の Turnstile 認証を完了してください",
"registerSuccess": "登録が完了しました",
"registerSuccessDesc": "ログインタブに切り替え、認証を完了してログインしてください"
}
}
}
+3 -2
View File
@@ -3,7 +3,9 @@
"title": "権限がありません",
"description": "このページにアクセスする権限がありません。サイト管理者に連絡してください",
"adminContact": "管理者の連絡先",
"backToHome": "ホームに戻る"
"backToHome": "ホームに戻る",
"needPermission": "需要公爵或更高权限才能管理 API Key",
"contactAdmin": "请联系网站管理员升级您的角色"
},
"layout": {
"myEmails": "マイメールボックス",
@@ -165,4 +167,3 @@
}
}
}
+9 -1
View File
@@ -107,6 +107,15 @@
"adminContact": "管理者連絡先",
"adminContactPlaceholder": "メールまたはその他の連絡先",
"maxEmails": "ユーザーあたりの最大メールボックス数",
"turnstile": {
"enable": "Cloudflare Turnstile を有効化",
"enableDescription": "有効にすると、ユーザー名とパスワードでのログイン・登録に Turnstile 認証が必要になります",
"siteKey": "Site Key",
"siteKeyPlaceholder": "Turnstile Site Key を入力",
"secretKey": "Secret Key",
"secretKeyPlaceholder": "Turnstile Secret Key を入力",
"secretKeyDescription": "Cloudflare で Turnstile を作成し、必須のキーを入力してから有効化してください"
},
"save": "設定を保存",
"saving": "保存中...",
"saveSuccess": "設定を保存しました",
@@ -128,4 +137,3 @@
"updateFailed": "ユーザーロールの更新に失敗しました"
}
}
+5 -2
View File
@@ -36,8 +36,11 @@
"loginFailedDesc": "用户名或密码错误",
"registerFailed": "注册失败",
"registerFailedDesc": "请稍后重试",
"autoLoginFailed": "自动登录失败,请手动登录"
"autoLoginFailed": "自动登录失败,请手动登录",
"turnstileRequired": "请先完成人机验证",
"turnstileRequiredDesc": "请完成下方的 Turnstile 验证后再尝试",
"registerSuccess": "注册成功",
"registerSuccessDesc": "请切换到登录选项卡,通过验证后登录账号"
}
}
}
+3 -2
View File
@@ -3,7 +3,9 @@
"title": "权限不足",
"description": "你没有权限访问此页面,请联系网站管理员",
"adminContact": "管理员联系方式",
"backToHome": "返回首页"
"backToHome": "返回首页",
"needPermission": "需要公爵或更高权限才能管理 API Key",
"contactAdmin": "请联系网站管理员升级您的角色"
},
"layout": {
"myEmails": "我的邮箱",
@@ -165,4 +167,3 @@
}
}
}
+9 -1
View File
@@ -107,6 +107,15 @@
"adminContact": "管理员联系方式",
"adminContactPlaceholder": "邮箱或其他联系方式",
"maxEmails": "每个用户最大邮箱数",
"turnstile": {
"enable": "启用 Cloudflare Turnstile",
"enableDescription": "开启后,账号登录与注册将需要通过 Turnstile 验证",
"siteKey": "Site Key",
"siteKeyPlaceholder": "输入 Turnstile Site Key",
"secretKey": "Secret Key",
"secretKeyPlaceholder": "输入 Turnstile Secret Key",
"secretKeyDescription": "开启前请先在 Cloudflare 创建 Turnstile,并填写上述必填参数"
},
"save": "保存配置",
"saving": "保存中...",
"saveSuccess": "配置保存成功",
@@ -128,4 +137,3 @@
"updateFailed": "更新用户角色失败"
}
}
+5 -2
View File
@@ -36,8 +36,11 @@
"loginFailedDesc": "使用者名稱或密碼錯誤",
"registerFailed": "註冊失敗",
"registerFailedDesc": "請稍後再試",
"autoLoginFailed": "自動登入失敗,請手動登入"
"autoLoginFailed": "自動登入失敗,請手動登入",
"turnstileRequired": "請先完成驗證",
"turnstileRequiredDesc": "請先完成下方的 Turnstile 驗證再繼續",
"registerSuccess": "註冊成功",
"registerSuccessDesc": "請切換至登入分頁,完成驗證後登入帳號"
}
}
}
+3 -2
View File
@@ -3,7 +3,9 @@
"title": "權限不足",
"description": "你沒有權限訪問此頁面,請聯絡網站管理員",
"adminContact": "管理員聯絡方式",
"backToHome": "返回首頁"
"backToHome": "返回首頁",
"needPermission": "需要公爵或更高權限才能管理 API Key",
"contactAdmin": "請聯絡網站管理員升級你的角色"
},
"layout": {
"myEmails": "我的郵箱",
@@ -165,4 +167,3 @@
}
}
}
+9 -1
View File
@@ -107,6 +107,15 @@
"adminContact": "管理員聯絡方式",
"adminContactPlaceholder": "郵箱或其他聯絡方式",
"maxEmails": "每個使用者最大郵箱數",
"turnstile": {
"enable": "啟用 Cloudflare Turnstile",
"enableDescription": "啟用後,使用者名稱與密碼的登入/註冊需要通過 Turnstile 驗證",
"siteKey": "Site Key",
"siteKeyPlaceholder": "輸入 Turnstile Site Key",
"secretKey": "Secret Key",
"secretKeyPlaceholder": "輸入 Turnstile Secret Key",
"secretKeyDescription": "請先在 Cloudflare 建立 Turnstile 並填寫上述必填參數後再啟用"
},
"save": "儲存設定",
"saving": "儲存中...",
"saveSuccess": "設定儲存成功",
@@ -128,4 +137,3 @@
"updateFailed": "更新使用者角色失敗"
}
}