Browse Source

Convert two-factor providers to string

pull/4386/head
Daniel García 10 months ago
parent
commit
4988e33974
No known key found for this signature in database GPG Key ID: FC8A7D14C3CD543A
  1. 7
      src/api/identity.rs

7
src/api/identity.rs

@ -564,8 +564,11 @@ async fn _json_err_twofactor(providers: &[i32], user_uuid: &str, conn: &mut DbCo
let mut result = json!({ let mut result = json!({
"error" : "invalid_grant", "error" : "invalid_grant",
"error_description" : "Two factor required.", "error_description" : "Two factor required.",
"TwoFactorProviders" : providers, "TwoFactorProviders" : providers.iter().map(ToString::to_string).collect::<Vec<String>>(),
"TwoFactorProviders2" : {} // { "0" : null } "TwoFactorProviders2" : {}, // { "0" : null }
"MasterPasswordPolicy": {
"Object": "masterPasswordPolicy"
}
}); });
for provider in providers { for provider in providers {

Loading…
Cancel
Save