Closed StefanLobbenmeier closed 3 years ago
I was able to see why - the webauthn.io calls
makeCredentialOptions.publicKey.challenge = bufferDecode(makeCredentialOptions.publicKey.challenge);
makeCredentialOptions.publicKey.user.id = bufferDecode(makeCredentialOptions.publicKey.user.id);
to convert the base64 to an Uint8Array before calling the browser api. I will have to manually revert that before calling JSON.stringify on this Uint8Array
To revert https://webauthn.io/ uses
function bufferEncode(value) {
return base64js.fromByteArray(value)
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=/g, "");
}
From webauthn.io I get this json (later in the issue) - the user.id in it is encoded as an object:
but this library expects it to be encoded in base64 and can not handle the object version of it.