From 5c5baba3d47f3deb79f9f9a32fd7b5f3b0fe86e3 Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Wed, 11 Mar 2026 01:30:12 +0800 Subject: [PATCH] debug: add step-by-step alerts to trace passkey registration flow --- dashboard/frontend/src/routes/Settings.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dashboard/frontend/src/routes/Settings.svelte b/dashboard/frontend/src/routes/Settings.svelte index 3cbf7fa..88145e6 100644 --- a/dashboard/frontend/src/routes/Settings.svelte +++ b/dashboard/frontend/src/routes/Settings.svelte @@ -36,13 +36,18 @@ } async function registerPasskey() { + alert("registerPasskey called!"); passkeyLoading = true; passkeyMsg = ""; passkeyErr = ""; try { + alert("Checking PublicKeyCredential support..."); if (!window.PublicKeyCredential) { + alert("PublicKeyCredential NOT supported!"); throw new Error("Passkeys are not supported in this browser or context"); } + alert("Fetching registration options..."); const opts = await post("/auth/passkey/register/options"); + alert("Got options: " + JSON.stringify(opts).substring(0, 100)); opts.challenge = base64urlToBuffer(opts.challenge); opts.user.id = base64urlToBuffer(opts.user.id); if (opts.excludeCredentials) {