summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/authentication/verifyAuthenticationResponse.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-11-11 19:47:02 -0800
committerMatthew Miller <matthew@millerti.me>2022-11-11 19:47:08 -0800
commita42cd6ab88bc3081e86a10d920c5a3949ee48f95 (patch)
treeace1e1dbc9e2253a75465b59f7e141ab69aecafa /packages/server/src/authentication/verifyAuthenticationResponse.ts
parentb258acf84eedd5eefdecbe70baaeefe004ad6111 (diff)
Make toHash async to prep for SubtleCrypto
Diffstat (limited to 'packages/server/src/authentication/verifyAuthenticationResponse.ts')
-rw-r--r--packages/server/src/authentication/verifyAuthenticationResponse.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/server/src/authentication/verifyAuthenticationResponse.ts b/packages/server/src/authentication/verifyAuthenticationResponse.ts
index 9f52d70..100cb4c 100644
--- a/packages/server/src/authentication/verifyAuthenticationResponse.ts
+++ b/packages/server/src/authentication/verifyAuthenticationResponse.ts
@@ -194,7 +194,7 @@ export async function verifyAuthenticationResponse(
}
}
- const clientDataHash = toHash(base64url.toBuffer(response.clientDataJSON));
+ const clientDataHash = await toHash(base64url.toBuffer(response.clientDataJSON));
const signatureBase = uint8Array.concat([authDataBuffer, clientDataHash]);
const signature = base64url.toBuffer(response.signature);