simplewebauthn
Installation
SKILL.md
- Look up on
generateRegistrationOptions.d.ts,verifyRegistrationResponse.d.ts,generateAuthenticationOptions.d.tsandverifyAuthenticationResponse.d.tsfor types. - Use binary value for
userIDwhen invokinggenerateRegistrationOptions(). - Use
requireUserVerification: falseforverifyRegistrationResponse()unlessauthenticatorSelection.residentKey: "required"on the frontend. registrationInfo.credentialIDdoesn't exist inverifyRegistrationResponse()result. UseregistrationInfo.credential.idinstead, which representsstring.
credentialDeviceTypeandcredentialBackUpareVerifiedRegistrationResponse.registrationInfoproperties.- Use
isoBase64URL.fromBufferandisoBase64URL.toBufferto convert between base64urlstringandBuffer. - Append
verifyBrowserAutofillInput: falsetostartAuthentcation()when the form is consisted of web components. - When implementing
verifyAuthenticationResponse(), pass incredentialobject instead ofauthenticatorobject, which contains:idfor the credential ID as a buffer,publicKeyfor the public key as a buffer,counterfor the counter as a number,transportsfor the transports as an array of strings.