From 1386ea45cf03a68c6a0649ded2aa2c0e6375a06b Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Mon, 15 Dec 2025 09:22:58 +0800 Subject: [PATCH] fix webAuthn insecure error view as you seen, in cureent status `initUserAuthWebAuthn` will prcheck `window.isSecureContext`, if not ok, will hide the `passkey` btton and return directly. I think it's not right, first, not show any error message looks not a good ui, and it's looks will make an empty container was show when registion button was disabled also (maybe f-i-x #36115), then initUserAuthWebAuthn has `window.isSecureContext` check also which looks duplcate. so I'd like move hideElem(elSignInPasskeyBtn); to `detectWebAuthnSupport` failed routs to make it simple and show insecure error corectly. Signed-off-by: a1012112796 <1012112796@qq.com> --- web_src/js/features/user-auth-webauthn.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web_src/js/features/user-auth-webauthn.ts b/web_src/js/features/user-auth-webauthn.ts index 50165c337708a..6de84e94e0d66 100644 --- a/web_src/js/features/user-auth-webauthn.ts +++ b/web_src/js/features/user-auth-webauthn.ts @@ -11,13 +11,8 @@ export async function initUserAuthWebAuthn() { return; } - // webauthn is only supported on secure contexts - if (!window.isSecureContext) { - if (elSignInPasskeyBtn) hideElem(elSignInPasskeyBtn); - return; - } - if (!detectWebAuthnSupport()) { + if (elSignInPasskeyBtn) hideElem(elSignInPasskeyBtn); return; }