summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startRegistration.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2024-04-11 21:42:05 -0700
committerMatthew Miller <matthew@millerti.me>2024-04-11 21:42:05 -0700
commit0156c639cabdc44392aa58cb5d2f55bf201fd8ab (patch)
tree85d4e2f78ed15617e0fc50216dfc9e45360757b9 /packages/browser/src/methods/startRegistration.ts
parent4c3f6934817913dc065c6400b956e36b301ec5fe (diff)
Treat user.id as base64url string during reg
Diffstat (limited to 'packages/browser/src/methods/startRegistration.ts')
-rw-r--r--packages/browser/src/methods/startRegistration.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/browser/src/methods/startRegistration.ts b/packages/browser/src/methods/startRegistration.ts
index 09117c3..73c899e 100644
--- a/packages/browser/src/methods/startRegistration.ts
+++ b/packages/browser/src/methods/startRegistration.ts
@@ -5,7 +5,6 @@ import {
RegistrationResponseJSON,
} from '@simplewebauthn/types';
-import { utf8StringToBuffer } from '../helpers/utf8StringToBuffer';
import { bufferToBase64URLString } from '../helpers/bufferToBase64URLString';
import { base64URLStringToBuffer } from '../helpers/base64URLStringToBuffer';
import { browserSupportsWebAuthn } from '../helpers/browserSupportsWebAuthn';
@@ -32,7 +31,7 @@ export async function startRegistration(
challenge: base64URLStringToBuffer(creationOptionsJSON.challenge),
user: {
...creationOptionsJSON.user,
- id: utf8StringToBuffer(creationOptionsJSON.user.id),
+ id: base64URLStringToBuffer(creationOptionsJSON.user.id),
},
excludeCredentials: creationOptionsJSON.excludeCredentials?.map(
toPublicKeyCredentialDescriptor,