From 2df1bb85a64d58c5b978e54d8e6383587a6ec2e5 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 22 May 2020 15:49:36 -0700 Subject: Mirror attestation authData returned in assertion --- packages/typescript-types/src/index.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'packages/typescript-types/src') diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index e828d7e..f94782d 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -163,12 +163,18 @@ export type VerifiedAttestation = { * Result of assertion verification * * @param verified If the assertion response could be verified - * @param counter The number of times the authenticator reported it has been used. **Should be - * kept in a DB for later reference to help prevent replay attacks!** + * @param authenticatorInfo.base64CredentialID 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!** */ export type VerifiedAssertion = { verified: boolean; - counter: number; + authenticatorInfo?: { + counter: number, + base64CredentialID: string, + }, }; export type CertificateInfo = { -- cgit v1.2.3