summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-12-27 21:56:14 -0800
committerMatthew Miller <matthew@millerti.me>2022-12-27 21:56:14 -0800
commit08f7f69b221ce33b4bfa6108493fe20d0b7f93b0 (patch)
tree686adb3a370e68f76541400740a0b722350d8705 /packages/server/src
parentad5e7119317ab5915c7063b575e2bdd4fe263f9e (diff)
Revert renaming of registration credentialType
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/registration/verifyRegistrationResponse.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/server/src/registration/verifyRegistrationResponse.ts b/packages/server/src/registration/verifyRegistrationResponse.ts
index 29f6025..2546813 100644
--- a/packages/server/src/registration/verifyRegistrationResponse.ts
+++ b/packages/server/src/registration/verifyRegistrationResponse.ts
@@ -64,7 +64,7 @@ export async function verifyRegistrationResponse(
requireUserVerification = true,
supportedAlgorithmIDs = supportedCOSEAlgorithmIdentifiers,
} = options;
- const { id, rawId, type: responseType, response: attestationResponse } = response;
+ const { id, rawId, type: credentialType, response: attestationResponse } = response;
// Ensure credential specified an ID
if (!id) {
@@ -77,8 +77,8 @@ export async function verifyRegistrationResponse(
}
// Make sure credential type is public-key
- if (responseType !== 'public-key') {
- throw new Error(`Unexpected credential type ${responseType}, expected "public-key"`);
+ if (credentialType !== 'public-key') {
+ throw new Error(`Unexpected credential type ${credentialType}, expected "public-key"`);
}
const clientDataJSON = decodeClientDataJSON(attestationResponse.clientDataJSON);
@@ -241,7 +241,7 @@ export async function verifyRegistrationResponse(
aaguid: convertAAGUIDToString(aaguid),
credentialID,
credentialPublicKey,
- credentialType: responseType,
+ credentialType,
attestationObject,
userVerified: flags.uv,
credentialDeviceType,