diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-22 15:49:36 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-22 15:49:36 -0700 |
commit | 2df1bb85a64d58c5b978e54d8e6383587a6ec2e5 (patch) | |
tree | a6e9bb146646963fd104f3a636c8f828df131038 | |
parent | f50caf6422d0030f4109b6174bb0b21e70ca0efa (diff) |
Mirror attestation authData returned in assertion
-rw-r--r-- | packages/server/src/assertion/verifyAssertionResponse.ts | 1 | ||||
-rw-r--r-- | packages/typescript-types/src/index.ts | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/packages/server/src/assertion/verifyAssertionResponse.ts b/packages/server/src/assertion/verifyAssertionResponse.ts index 39ec308..fb668f4 100644 --- a/packages/server/src/assertion/verifyAssertionResponse.ts +++ b/packages/server/src/assertion/verifyAssertionResponse.ts @@ -76,7 +76,6 @@ export default function verifyAssertionResponse( const toReturn = { verified: verifySignature(signature, signatureBase, publicKey), - counter, }; return toReturn; 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 = { |