summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/server/src/assertion/verifyAssertionResponse.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/assertion/verifyAssertionResponse.ts b/packages/server/src/assertion/verifyAssertionResponse.ts
index 59c3b4e..4441428 100644
--- a/packages/server/src/assertion/verifyAssertionResponse.ts
+++ b/packages/server/src/assertion/verifyAssertionResponse.ts
@@ -1,7 +1,6 @@
import base64url from 'base64url';
import {
AuthenticatorAssertionResponseJSON,
- U2F_USER_PRESENTED,
AuthenticatorDevice,
VerifiedAssertion,
} from "@webauthntine/typescript-types";
@@ -41,8 +40,9 @@ export default function verifyAssertionResponse(
const authDataBuffer = base64url.toBuffer(base64AuthenticatorData);
const authDataStruct = parseAuthenticatorData(authDataBuffer);
+ const { credentialID, flags, counter } = authDataStruct;
- if (!(authData.flags & U2F_USER_PRESENTED)) {
+ if (!(flags.up)) {
throw new Error('User was NOT present during assertion!');
}