mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 14:51:45 +00:00
feat: Passkey (WebAuthn) login (#1111)
* feat(auth): passkey (WebAuthn) login — server endpoints, schema + admin toggle Add @simplewebauthn/server registration and primary (discoverable) login ceremonies under /api/auth/passkey, a webauthn_credentials + single-use webauthn_challenges schema (migration), the instance-wide passkey_login toggle (default off) enforced before auth by a guard, and require_mfa satisfaction via a verified passkey. RP ID/origin come only from server config (webauthn_rp_id/origins -> APP_URL), never request headers. * feat(auth): passkey enrolment, login button + admin settings UI PasskeysSection in account settings (add/rename/remove with a current-password step-up), a 'Sign in with a passkey' button on the login page, the admin enable + RP-ID/origins controls, and a per-user admin reset action. * i18n(auth): passkey strings across all locales Add login/settings/admin passkey keys to en and all 19 translated locales.
This commit is contained in:
@@ -327,5 +327,23 @@ const admin: TranslationStrings = {
|
||||
'admin.addons.catalog.journey.name': '旅程',
|
||||
'admin.addons.catalog.journey.description':
|
||||
'旅行追蹤與旅行日誌,包含打卡、照片和每日故事',
|
||||
'admin.passkey.title': 'Passkey 登入',
|
||||
'admin.passkey.cardHint': '讓使用者使用 Passkey(WebAuthn)登入。預設為關閉。',
|
||||
'admin.passkey.login': '啟用 Passkey 登入',
|
||||
'admin.passkey.loginHint':
|
||||
'顯示「使用 Passkey 登入」選項,並讓使用者在設定中註冊 Passkey。',
|
||||
'admin.passkey.notConfigured':
|
||||
'此部署尚未解析出任何 WebAuthn 網域。請設定下方的 APP_URL 或 Relying Party ID——在此之前 Passkey 將保持隱藏。',
|
||||
'admin.passkey.rpId': 'Relying Party ID(網域)',
|
||||
'admin.passkey.rpIdHint':
|
||||
'Passkey 綁定的純網域,例如 trek.example.org。留空則從 APP_URL 推導。日後變更將使現有 Passkey 失效。',
|
||||
'admin.passkey.origins': '允許的來源',
|
||||
'admin.passkey.originsHint':
|
||||
'以逗號分隔的完整來源,例如 https://trek.example.org。留空則使用 APP_URL。',
|
||||
'admin.passkey.reset': '重設 Passkey',
|
||||
'admin.passkey.resetHint':
|
||||
'移除此使用者的所有 Passkey(例如裝置遺失時)。他們仍可使用密碼登入。',
|
||||
'admin.passkey.resetConfirm': '要移除 {name} 的所有 Passkey 嗎?',
|
||||
'admin.passkey.resetDone': '已移除 {count} 個 Passkey',
|
||||
};
|
||||
export default admin;
|
||||
|
||||
Reference in New Issue
Block a user