mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 11:10:18 +00:00
46ed70bfde
Per the stage-batch14 ship plan, passkey/WebAuthn support is shipped opt-in default-off behind an explicit feature flag so deployments can disable the entire surface (UI + endpoints + credential storage) without needing to delete code. Enable via either: - HERMES_WEBUI_PASSKEY=1 environment variable, OR - webui_passkey_enabled: true in config.yaml With the flag off: - are_passkeys_enabled() returns False even if credentials exist - is_auth_enabled() falls back to password-only checking - /login renders password-only (no passkey button) - All 6 /api/auth/passkey/* endpoints return 404 with a clear message - Settings → System → Passkeys section is hidden Mirrors the #2527 notes-drawer flag shape (env-or-config, truthy parse). Auth is high-stakes; opt-in lets us land the code while keeping default deployments on the well-tested password-only path. Touches: api/auth.py (new _passkey_feature_flag_enabled helper, gated are_passkeys_enabled), api/routes.py (6 endpoint guards).