From 4988e3397461d2ea087fe22d08af5dcc29bed720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 20 Jun 2024 20:54:28 +0200 Subject: [PATCH] Convert two-factor providers to string --- src/api/identity.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/identity.rs b/src/api/identity.rs index 89c82859..fbf8d506 100644 --- a/src/api/identity.rs +++ b/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!({ "error" : "invalid_grant", "error_description" : "Two factor required.", - "TwoFactorProviders" : providers, - "TwoFactorProviders2" : {} // { "0" : null } + "TwoFactorProviders" : providers.iter().map(ToString::to_string).collect::>(), + "TwoFactorProviders2" : {}, // { "0" : null } + "MasterPasswordPolicy": { + "Object": "masterPasswordPolicy" + } }); for provider in providers {