summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/authentication/generateAuthenticationOptions.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-16 22:10:01 -0700
committerMatthew Miller <matthew@millerti.me>2023-08-16 22:10:01 -0700
commit4a38a00937da90801e2b50822892c6bebf91edf5 (patch)
tree240d1ad397665f6eef8ba07c81e24926e8d61097 /packages/server/src/authentication/generateAuthenticationOptions.ts
parent8df0bfd4b5c8c8ea919e0bab351418358452d230 (diff)
Deal with making getRandomValues async
Diffstat (limited to 'packages/server/src/authentication/generateAuthenticationOptions.ts')
-rw-r--r--packages/server/src/authentication/generateAuthenticationOptions.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/server/src/authentication/generateAuthenticationOptions.ts b/packages/server/src/authentication/generateAuthenticationOptions.ts
index 92efaa8..57eb9e0 100644
--- a/packages/server/src/authentication/generateAuthenticationOptions.ts
+++ b/packages/server/src/authentication/generateAuthenticationOptions.ts
@@ -29,12 +29,12 @@ export type GenerateAuthenticationOptionsOpts = {
* @param extensions Additional plugins the authenticator or browser should use during authentication
* @param rpID Valid domain name (after `https://`)
*/
-export function generateAuthenticationOptions(
+export async function generateAuthenticationOptions(
options: GenerateAuthenticationOptionsOpts = {},
-): PublicKeyCredentialRequestOptionsJSON {
+): Promise<PublicKeyCredentialRequestOptionsJSON> {
const {
allowCredentials,
- challenge = generateChallenge(),
+ challenge = await generateChallenge(),
timeout = 60000,
userVerification = "preferred",
extensions,