diff options
Diffstat (limited to 'packages/browser/src')
-rw-r--r-- | packages/browser/src/methods/startAssertion.ts | 6 | ||||
-rw-r--r-- | packages/browser/src/methods/startAttestation.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/browser/src/methods/startAssertion.ts b/packages/browser/src/methods/startAssertion.ts index 81cad60..b65325b 100644 --- a/packages/browser/src/methods/startAssertion.ts +++ b/packages/browser/src/methods/startAssertion.ts @@ -37,7 +37,7 @@ export default async function startAssertion( throw new Error('Assertion was not completed'); } - const { rawId, response } = credential; + const { id, rawId, response, type } = credential; let userHandle = undefined; if (response.userHandle) { @@ -46,14 +46,14 @@ export default async function startAssertion( // Convert values to base64 to make it easier to send back to the server return { - ...credential, + id, rawId: bufferToBase64URLString(rawId), response: { - ...response, authenticatorData: bufferToBase64URLString(response.authenticatorData), clientDataJSON: bufferToBase64URLString(response.clientDataJSON), signature: bufferToBase64URLString(response.signature), userHandle, }, + type, }; } diff --git a/packages/browser/src/methods/startAttestation.ts b/packages/browser/src/methods/startAttestation.ts index 1612961..d5e540f 100644 --- a/packages/browser/src/methods/startAttestation.ts +++ b/packages/browser/src/methods/startAttestation.ts @@ -41,16 +41,16 @@ export default async function startAttestation( throw new Error('Attestation was not completed'); } - const { rawId, response } = credential; + const { id, rawId, response, type } = credential; // Convert values to base64 to make it easier to send back to the server return { - ...credential, + id, rawId: bufferToBase64URLString(rawId), response: { - ...response, attestationObject: bufferToBase64URLString(response.attestationObject), clientDataJSON: bufferToBase64URLString(response.clientDataJSON), }, + type, }; } |