diff options
author | Matthew Miller <matthew@millerti.me> | 2021-02-04 09:45:52 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2021-02-04 09:45:52 -0800 |
commit | c58ca6abf0d64a85771a865cf59f9783a20c66f0 (patch) | |
tree | 3f44297f5b47abf1b88db49ae11e399282a9adaf /packages/browser/src/helpers/toUint8Array.ts | |
parent | d8cbcb40b9f32d7a6eab82f5e31c6e5272c9d163 (diff) |
Restore userID argument in attestation options
Diffstat (limited to 'packages/browser/src/helpers/toUint8Array.ts')
-rw-r--r-- | packages/browser/src/helpers/toUint8Array.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/browser/src/helpers/toUint8Array.ts b/packages/browser/src/helpers/toUint8Array.ts new file mode 100644 index 0000000..1e2243f --- /dev/null +++ b/packages/browser/src/helpers/toUint8Array.ts @@ -0,0 +1,7 @@ +/** + * A helper method to convert an arbitrary string sent from the server to a Uint8Array the + * authenticator will expect. + */ +export default function toUint8Array(value: string): Uint8Array { + return new TextEncoder().encode(value); +} |