make webauthn more optional (#6160)

* make webauthn optional

* hide passkey if domain is not set
This commit is contained in:
Stefan Melmuk
2025-08-26 22:07:20 +02:00
committed by GitHub
parent f76362ff89
commit 5a8736e116
6 changed files with 33 additions and 57 deletions

View File

@@ -1525,6 +1525,10 @@ impl Config {
}
}
pub fn is_webauthn_2fa_supported(&self) -> bool {
Url::parse(&self.domain()).expect("DOMAIN not a valid URL").domain().is_some()
}
/// Tests whether the admin token is set to a non-empty value.
pub fn is_admin_token_set(&self) -> bool {
let token = self.admin_token();