summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAttestation.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-04-15 21:34:26 -0700
committerMatthew Miller <matthew@millerti.me>2021-04-15 21:34:26 -0700
commitc8c492572a0f72c6d9b8795a4e37621b5f49d2b9 (patch)
tree204dddd53d07a64ea3f21ee855876dc9af4267be /packages/browser/src/methods/startAttestation.ts
parentcb445cd8404af140120260ca77294a70d7202a71 (diff)
Rename toUint8Array to stringToArrayBuffer
Diffstat (limited to 'packages/browser/src/methods/startAttestation.ts')
-rw-r--r--packages/browser/src/methods/startAttestation.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/browser/src/methods/startAttestation.ts b/packages/browser/src/methods/startAttestation.ts
index 22ebe64..5601581 100644
--- a/packages/browser/src/methods/startAttestation.ts
+++ b/packages/browser/src/methods/startAttestation.ts
@@ -4,7 +4,7 @@ import {
AttestationCredentialJSON,
} from '@simplewebauthn/typescript-types';
-import toUint8Array from '../helpers/toUint8Array';
+import stringToArrayBuffer from '../helpers/stringToArrayBuffer';
import bufferToBase64URLString from '../helpers/bufferToBase64URLString';
import base64URLStringToBuffer from '../helpers/base64URLStringToBuffer';
import supportsWebauthn from '../helpers/supportsWebauthn';
@@ -28,7 +28,7 @@ export default async function startAttestation(
challenge: base64URLStringToBuffer(creationOptionsJSON.challenge),
user: {
...creationOptionsJSON.user,
- id: toUint8Array(creationOptionsJSON.user.id),
+ id: stringToArrayBuffer(creationOptionsJSON.user.id),
},
excludeCredentials: creationOptionsJSON.excludeCredentials.map(toPublicKeyCredentialDescriptor),
};