aboutsummaryrefslogtreecommitdiff
path: root/src/api/identity.rs
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2019-04-15 13:06:42 +0200
committerDaniel García <[email protected]>2019-04-15 13:07:23 +0200
commit253faaf02372ec0ce198e2ee480de4a59986d8a6 (patch)
treef7baa662e8079f5832bb27dc332a6f92cd158a99 /src/api/identity.rs
parent3d843a6a51d2a74a5fc210eae90986f5f8a44e5d (diff)
downloadvaultwarden-253faaf02372ec0ce198e2ee480de4a59986d8a6.tar.gz
vaultwarden-253faaf02372ec0ce198e2ee480de4a59986d8a6.zip
Use users duo host when required, instead of always using the global one
Diffstat (limited to 'src/api/identity.rs')
-rw-r--r--src/api/identity.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/identity.rs b/src/api/identity.rs
index 3e7b526b..0645dad1 100644
--- a/src/api/identity.rs
+++ b/src/api/identity.rs
@@ -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,
});
}