mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-08-02 00:59:08 +00:00
Convert two-factor providers to string
This commit is contained in:
parent
0d6a8b8a32
commit
4988e33974
1 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue