summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAttestation.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/browser/src/methods/startAttestation.ts')
-rw-r--r--packages/browser/src/methods/startAttestation.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/browser/src/methods/startAttestation.ts b/packages/browser/src/methods/startAttestation.ts
index f77c2de..ea05fa8 100644
--- a/packages/browser/src/methods/startAttestation.ts
+++ b/packages/browser/src/methods/startAttestation.ts
@@ -23,13 +23,13 @@ export default async function startAttestation(
// We need to convert some values to Uint8Arrays before passing the credentials to the navigator
const publicKey: PublicKeyCredentialCreationOptions = {
- ...creationOptionsJSON.publicKey,
- challenge: toUint8Array(creationOptionsJSON.publicKey.challenge),
+ ...creationOptionsJSON,
+ challenge: toUint8Array(creationOptionsJSON.challenge),
user: {
- ...creationOptionsJSON.publicKey.user,
- id: toUint8Array(creationOptionsJSON.publicKey.user.id),
+ ...creationOptionsJSON.user,
+ id: toUint8Array(creationOptionsJSON.user.id),
},
- excludeCredentials: creationOptionsJSON.publicKey.excludeCredentials.map(
+ excludeCredentials: creationOptionsJSON.excludeCredentials.map(
toPublicKeyCredentialDescriptor,
),
};