The specification says:
> The user handle MUST NOT be empty, though it MAY be null.
Source: https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialuserentity-id
Some authenticators (e.g., Windows Hello) consider `new ArrayBuffer(0)` to be invalid, others (e.g., 1Password) consider it to be valid. Setting `id` to a non-zero value enables wider compatibility.
return navigator.credentials.create({
publicKey: {
rp: { name: '' },
- user: { id: new ArrayBuffer(0), name: '', displayName: '' },
+ user: { id: new ArrayBuffer(1), name: '', displayName: '' },
pubKeyCredParams: [{ type: 'public-key', alg: -8 }, { type: 'public-key', alg: -7 }, { type: 'public-key', alg: -257 }],
extensions: { prf: { eval: { first: new ArrayBuffer(0) } } },
challenge: new ArrayBuffer(0)