diff options
author | Matthew Miller <matthew@millerti.me> | 2020-06-02 12:08:47 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-06-02 12:08:47 -0700 |
commit | 5ae824965ebee5590486c36fe0365c9ad802bb23 (patch) | |
tree | 69ca6e8e5ae132b1e067a87f17b0f5687605ee4a /packages/browser/src/methods/startAttestation.ts | |
parent | 451ae557b51875f6b0eedb055d5561f22ad4456f (diff) |
Update start methods to use new helper
Diffstat (limited to 'packages/browser/src/methods/startAttestation.ts')
-rw-r--r-- | packages/browser/src/methods/startAttestation.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/browser/src/methods/startAttestation.ts b/packages/browser/src/methods/startAttestation.ts index 51ea6ec..1612961 100644 --- a/packages/browser/src/methods/startAttestation.ts +++ b/packages/browser/src/methods/startAttestation.ts @@ -5,7 +5,7 @@ import { } from '@simplewebauthn/typescript-types'; import toUint8Array from '../helpers/toUint8Array'; -import toBase64String from '../helpers/toBase64String'; +import bufferToBase64URLString from '../helpers/bufferToBase64URLString'; import supportsWebauthn from '../helpers/supportsWebauthn'; import toPublicKeyCredentialDescriptor from '../helpers/toPublicKeyCredentialDescriptor'; @@ -46,11 +46,11 @@ export default async function startAttestation( // Convert values to base64 to make it easier to send back to the server return { ...credential, - rawId: toBase64String(rawId), + rawId: bufferToBase64URLString(rawId), response: { ...response, - attestationObject: toBase64String(response.attestationObject), - clientDataJSON: toBase64String(response.clientDataJSON), - } + attestationObject: bufferToBase64URLString(response.attestationObject), + clientDataJSON: bufferToBase64URLString(response.clientDataJSON), + }, }; } |