diff --git a/proxmox-tfa/src/api/mod.rs b/proxmox-tfa/src/api/mod.rs index 884130ce..e0084b93 100644 --- a/proxmox-tfa/src/api/mod.rs +++ b/proxmox-tfa/src/api/mod.rs @@ -76,8 +76,12 @@ pub struct TfaConfig { /// Helper to get a u2f instance from a u2f config, or `None` if there isn't one configured. fn get_u2f(u2f: &Option) -> Option { - u2f.as_ref() - .map(|cfg| u2f::U2f::new(cfg.appid.clone(), cfg.appid.clone())) + u2f.as_ref().map(|cfg| { + u2f::U2f::new( + cfg.appid.clone(), + cfg.origin.clone().unwrap_or_else(|| cfg.appid.clone()), + ) + }) } /// Helper to get a u2f instance from a u2f config.