diff options
author | Matthew Miller <matthew@millerti.me> | 2022-11-11 19:47:02 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-11-11 19:47:08 -0800 |
commit | a42cd6ab88bc3081e86a10d920c5a3949ee48f95 (patch) | |
tree | ace1e1dbc9e2253a75465b59f7e141ab69aecafa /packages/server/src/authentication/verifyAuthenticationResponse.test.ts | |
parent | b258acf84eedd5eefdecbe70baaeefe004ad6111 (diff) |
Make toHash async to prep for SubtleCrypto
Diffstat (limited to 'packages/server/src/authentication/verifyAuthenticationResponse.test.ts')
-rw-r--r-- | packages/server/src/authentication/verifyAuthenticationResponse.test.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/authentication/verifyAuthenticationResponse.test.ts b/packages/server/src/authentication/verifyAuthenticationResponse.test.ts index 66163dc..58e24b8 100644 --- a/packages/server/src/authentication/verifyAuthenticationResponse.test.ts +++ b/packages/server/src/authentication/verifyAuthenticationResponse.test.ts @@ -93,7 +93,7 @@ test('should throw when assertion type is not webauthn.create', async () => { test('should throw error if user was not present', async () => { mockParseAuthData.mockReturnValue({ - rpIdHash: toHash(Buffer.from('dev.dontneeda.pw', 'ascii')), + rpIdHash: await toHash(Buffer.from('dev.dontneeda.pw', 'ascii')), flags: 0, }); @@ -129,7 +129,7 @@ test('should throw error if previous counter value is not less than in response' test('should throw error if assertion RP ID is unexpected value', async () => { mockParseAuthData.mockReturnValue({ - rpIdHash: toHash(Buffer.from('bad.url', 'ascii')), + rpIdHash: await toHash(Buffer.from('bad.url', 'ascii')), flags: 0, }); |