diff options
Diffstat (limited to 'packages/server/src')
-rw-r--r-- | packages/server/src/assertion/verifyAssertionResponse.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/server/src/assertion/verifyAssertionResponse.ts b/packages/server/src/assertion/verifyAssertionResponse.ts index 0aa3605..cbb8c9c 100644 --- a/packages/server/src/assertion/verifyAssertionResponse.ts +++ b/packages/server/src/assertion/verifyAssertionResponse.ts @@ -194,8 +194,8 @@ export default function verifyAssertionResponse(options: Options): VerifiedAsser const toReturn = { verified: verifySignature(signature, signatureBase, publicKey), authenticatorInfo: { - counter, - base64CredentialID: credential.id, + newCounter: counter, + credentialID: authenticator.credentialID, }, }; @@ -206,16 +206,17 @@ export default function verifyAssertionResponse(options: Options): VerifiedAsser * Result of assertion verification * * @param verified If the assertion response could be verified - * @param authenticatorInfo.base64CredentialID The ID of the authenticator used during assertion. + * @param authenticatorInfo.credentialID The ID of the authenticator used during assertion. * Should be used to identify which DB authenticator entry needs its `counter` updated to the value * below - * @param authenticatorInfo.counter The number of times the authenticator identified above reported - * it has been used. **Should be kept in a DB for later reference to help prevent replay attacks!** + * @param authenticatorInfo.newCounter The number of times the authenticator identified above + * reported it has been used. **Should be kept in a DB for later reference to help prevent replay + * attacks!** */ export type VerifiedAssertion = { verified: boolean; authenticatorInfo: { - counter: number; - base64CredentialID: string; + credentialID: Buffer; + newCounter: number; }; }; |