From b9a36b0319225533b66aeedd6eb12b0bbafce296 Mon Sep 17 00:00:00 2001 From: zUnixorn Date: Sat, 7 Jun 2025 18:04:45 +0200 Subject: [PATCH] use same timeout as in webauthn 0.3 impl --- src/api/core/two_factor/webauthn.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/core/two_factor/webauthn.rs b/src/api/core/two_factor/webauthn.rs index 4f90a497..8b33b685 100644 --- a/src/api/core/two_factor/webauthn.rs +++ b/src/api/core/two_factor/webauthn.rs @@ -1,5 +1,6 @@ use std::str::FromStr; use std::sync::Arc; +use std::time::Duration; use once_cell::sync::Lazy; use rocket::serde::json::Json; use rocket::Route; @@ -34,7 +35,8 @@ pub static WEBAUTHN_2FA_CONFIG: Lazy> = Lazy::new(|| { &rp_id, &rp_origin, ).expect("Creating WebauthnBuilder failed") - .rp_name(&domain); + .rp_name(&domain) + .timeout(Duration::from_millis(60000)); Arc::new(webauthn.build().expect("Building Webauthn failed")) });