summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/authentication/generateAuthenticationOptions.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-12-10 23:29:05 -0800
committerMatthew Miller <matthew@millerti.me>2022-12-10 23:29:05 -0800
commitc56b52a31f3414c2860d2b70c8409ba4c5a748ea (patch)
tree87f98197040225c028e8260bcc3095dc61c06462 /packages/server/src/authentication/generateAuthenticationOptions.test.ts
parent461b67c0c6fadfb55c1da6c9c8ab2693ba4c9a03 (diff)
Explicitly prefer UV in auth options
Diffstat (limited to 'packages/server/src/authentication/generateAuthenticationOptions.test.ts')
-rw-r--r--packages/server/src/authentication/generateAuthenticationOptions.test.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/server/src/authentication/generateAuthenticationOptions.test.ts b/packages/server/src/authentication/generateAuthenticationOptions.test.ts
index 9048cf5..667827f 100644
--- a/packages/server/src/authentication/generateAuthenticationOptions.test.ts
+++ b/packages/server/src/authentication/generateAuthenticationOptions.test.ts
@@ -41,6 +41,7 @@ test('should generate credential request options suitable for sending via JSON',
},
],
timeout: 1,
+ userVerification: 'preferred',
});
});
@@ -56,7 +57,7 @@ test('defaults to 60 seconds if no timeout is specified', () => {
expect(options.timeout).toEqual(60000);
});
-test('should not set userVerification if not specified', () => {
+test('should set userVerification to "preferred" if not specified', () => {
const options = generateAuthenticationOptions({
challenge: challengeBuffer,
allowCredentials: [
@@ -65,7 +66,7 @@ test('should not set userVerification if not specified', () => {
],
});
- expect(options.userVerification).toEqual(undefined);
+ expect(options.userVerification).toEqual('preferred');
});
test('should not set allowCredentials if not specified', () => {
@@ -82,7 +83,7 @@ test('should generate without params', () => {
extensions: undefined,
rpId: undefined,
timeout: 60000,
- userVerification: undefined,
+ userVerification: 'preferred',
});
expect(typeof challenge).toEqual('string');
});