From 7a137c8947e5c781d2f4a28b2ae55acbc2af054e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Thu, 12 Nov 2026 22:47:56 +0100 Subject: [PATCH] backport fix (#13262) --- src/frontend/src/functions/auth.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/functions/auth.tsx b/src/frontend/src/functions/auth.tsx index c9ef72decc..5c8f4c1406 100644 --- a/src/frontend/src/functions/auth.tsx +++ b/src/frontend/src/functions/auth.tsx @@ -793,8 +793,10 @@ export async function handleWebauthnLogin( } try { - const publicKey = - PublicKeyCredential.parseRequestOptionsFromJSON(webauthn_challenge); + // The server returns the options wrapped as { publicKey: {...}, mediation: ... } + const publicKey = PublicKeyCredential.parseRequestOptionsFromJSON( + webauthn_challenge.publicKey ?? webauthn_challenge + ); const credential = await navigator.credentials.get({ publicKey }); await api .post(apiUrl(ApiEndpoints.auth_webauthn_login), {