debug: add step-by-step alerts to trace passkey registration flow
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 2m24s
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 2m24s
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user