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), {