demo · v137

Payment WebAuthn: error rename

Before v137, denying a Secure Payment Confirmation credential threw SecurityError. After v137, it throws NotAllowedError — matching every other user-gated WebAuthn flow. Click try create to see what your browser raises right now.

probing…
no attempt yet
verdict: —

the code

try {
  await navigator.credentials.create({
    publicKey: { /* … */ },
    payment: { rpId: location.host, /* … */ },
  });
} catch (e) {
  // Pre-v137: e.name === "SecurityError"
  // Post-v137: e.name === "NotAllowedError"
  console.log(e.name);
}

see also