Use users duo host when required, instead of always using the global one

This commit is contained in:
Daniel García
2019-04-15 13:06:42 +02:00
parent 3d843a6a51
commit 253faaf023
2 changed files with 9 additions and 9 deletions

View File

@@ -248,10 +248,10 @@ fn _json_err_twofactor(providers: &[i32], user_uuid: &str, conn: &DbConn) -> Api
None => err!("User does not exist"),
};
let signature = two_factor::generate_duo_signature(&email, conn)?;
let (signature, host) = two_factor::generate_duo_signature(&email, conn)?;
result["TwoFactorProviders2"][provider.to_string()] = json!({
"Host": CONFIG.duo_host(),
"Host": host,
"Signature": signature,
});
}