Browse Source

use same timeout as in webauthn 0.3 impl

pull/5934/head
zUnixorn 1 month ago
committed by Mathijs van Veluw
parent
commit
b9a36b0319
  1. 4
      src/api/core/two_factor/webauthn.rs

4
src/api/core/two_factor/webauthn.rs

@ -1,5 +1,6 @@
use std::str::FromStr; use std::str::FromStr;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use rocket::serde::json::Json; use rocket::serde::json::Json;
use rocket::Route; use rocket::Route;
@ -34,7 +35,8 @@ pub static WEBAUTHN_2FA_CONFIG: Lazy<Arc<Webauthn>> = Lazy::new(|| {
&rp_id, &rp_id,
&rp_origin, &rp_origin,
).expect("Creating WebauthnBuilder failed") ).expect("Creating WebauthnBuilder failed")
.rp_name(&domain); .rp_name(&domain)
.timeout(Duration::from_millis(60000));
Arc::new(webauthn.build().expect("Building Webauthn failed")) Arc::new(webauthn.build().expect("Building Webauthn failed"))
}); });

Loading…
Cancel
Save