feat: Add YubiKey OTP support and management features

- Implemented YubiKey OTP settings management in useAccountSecurityActions hook.
- Added API functions for retrieving, saving, and bootstrapping YubiKey OTP credentials.
- Enhanced authentication flow to support multiple two-factor providers, including YubiKey.
- Updated localization files to include new YubiKey-related strings in English, Spanish, Russian, and Chinese.
- Introduced new styles for YubiKey management UI components.
- Created utility functions for YubiKey OTP validation and credential handling.
This commit is contained in:
shuaiplus
2026-07-04 02:49:46 +08:00
parent c7eb6c663d
commit f63b745d05
27 changed files with 1325 additions and 61 deletions
+31
View File
@@ -27,6 +27,35 @@ const es: Record<string, string> = {
"txt_passkey_provider_help": "Usa una llave de seguridad compatible con FIDO2 o autenticación biométrica.",
"txt_yubico_otp_security_key": "Llave de seguridad Yubico OTP",
"txt_yubico_otp_security_key_help": "Usa un dispositivo YubiKey 4, 5 o NEO.",
"txt_yubikey_setup_intro": "Inserta tu YubiKey en un puerto USB. Selecciona el primer campo YubiKey vacío, toca el botón de la YubiKey y guarda el formulario.",
"txt_yubikey_plug_in": "Inserta tu YubiKey en un puerto USB.",
"txt_yubikey_select_empty_field": "Selecciona el primer campo YubiKey vacío.",
"txt_yubikey_touch_button": "Toca el botón de la YubiKey.",
"txt_yubikey_save_form": "Guarda el formulario.",
"txt_yubikey_x": "YubiKey {index}",
"txt_nfc_support": "Compatibilidad NFC",
"txt_yubikey_supports_nfc": "Una de mis llaves admite NFC.",
"txt_yubikey_supports_nfc_desc": "Si una de tus YubiKeys admite NFC, las apps móviles pueden avisarte cuando NFC esté disponible.",
"txt_disable_all_keys": "Desactivar todas las llaves",
"txt_yubikeys_updated": "YubiKeys actualizadas",
"txt_yubikey_update_failed": "No se pudieron actualizar las YubiKeys",
"txt_disable_yubikey_failed": "No se pudieron desactivar las YubiKeys",
"txt_yubikey_disabled": "YubiKeys desactivadas",
"txt_yubikey_enabled": "YubiKey activada.",
"txt_yubikey_config_required": "La validación de Yubico no está configurada",
"txt_yubikey_config_required_help": "Introduce primero un OTP de YubiKey. NodeWarden solicitará y guardará automáticamente el Client ID y la Secret key de la instancia, y luego abrirá el formulario de YubiKey.",
"txt_otp_from_yubikey": "OTP de YubiKey",
"txt_please_input_yubikey_otp": "Introduce el OTP de YubiKey",
"txt_yubikey_verify_failed": "No se pudo verificar la YubiKey",
"txt_press_yubikey_to_authenticate": "Pulsa tu YubiKey para autenticarte.",
"txt_yubikey_auto_configure": "Obtener y guardar automáticamente",
"txt_yubikey_validation_credentials": "Credenciales de validación de Yubico",
"txt_view": "Ver",
"txt_yubikey_config_updated": "Credenciales de validación de Yubico actualizadas",
"txt_yubikey_config_update_failed": "No se pudieron actualizar las credenciales de validación de Yubico",
"txt_yubikey_auto_config_failed": "No se pudieron obtener las credenciales de validación de Yubico",
"txt_yubikey_reconfigure_help": "Introduce un OTP nuevo para solicitar y reemplazar estas credenciales automáticamente.",
"txt_yubikey_auto_configure_again": "Obtener de nuevo automáticamente",
"txt_setting_coming_soon": "Próximamente.",
"txt_totp_manage_intro": "Escanea el código QR o introduce la clave en tu aplicación autenticadora, luego escribe el código de verificación.",
"txt_two_step_recovery_code_warning": "Si no puedes acceder a tu proveedor de inicio de sesión en dos pasos, tu código de recuperación de un solo uso puede desactivar el inicio de sesión en dos pasos. Guarda el código en un lugar seguro.",
@@ -860,6 +889,8 @@ const es: Record<string, string> = {
"txt_scope": "Ámbito",
"txt_grant_type": "Tipo de concesión",
"txt_refresh": "Actualizar",
"txt_refresh_status": "Actualizar estado",
"txt_load_failed": "No se pudo cargar",
"txt_refresh_in_seconds_s": "Actualizar en {seconds}s",
"txt_regenerate": "Regenerar",
"txt_registration_succeeded_please_sign_in": "Registro completado. Inicie sesión.",