fix: passkey options

This commit is contained in:
peintnermax
2024-08-14 14:35:43 +02:00
parent eeadb365f5
commit df30c6b9a7

View File

@@ -92,9 +92,11 @@ export default function RegisterPasskey({
return submitRegister().then((resp: RegisterPasskeyResponse) => {
const passkeyId = resp.passkeyId;
const options: CredentialCreationOptions =
(resp.publicKeyCredentialCreationOptions?.toJson() as CredentialCreationOptions) ??
(resp.publicKeyCredentialCreationOptions as CredentialCreationOptions) ??
{};
console.log(options);
if (options?.publicKey) {
options.publicKey.challenge = coerceToArrayBuffer(
options.publicKey.challenge,