[webauthn] Fix JavaScript sample code snippets (#2269)

kkoiwai has just created a new issue for https://github.com/w3c/webauthn:

== Fix JavaScript sample code snippets ==
## 1. AbortError 

In the section 1.3.4. Aborting Authentication Operations,
`        if (error == "AbortError") {`
should be
`        if (error.name === "AbortError") {`


## 2. add `-8` to pubKeyCredParams

In the section 1.3.1. Registration, 
`pubKeyCredParams` should add `-8` to refrect the section 5.4:
> [Relying Parties](https://w3c.github.io/webauthn/#relying-party) that wish to support a wide range of [authenticators](https://w3c.github.io/webauthn/#authenticator) SHOULD include at least the following [COSEAlgorithmIdentifier](https://w3c.github.io/webauthn/#typedefdef-cosealgorithmidentifier) values:
> * -8 (Ed25519)
> * -7 (ES256)
> * -257 (RS256)


## 
These 2 errors have been jointly found by Eji Kitamura, Masaru Kurahayashi and Kosuke Koiwai, the authors of the Japanese book "Everything about Paakeys".

Please view or discuss this issue at https://github.com/w3c/webauthn/issues/2269 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 9 March 2025 03:24:34 UTC