From 6862a9bbb872ebdc015a15a6ad70706e89123c43 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:12:59 -0500 Subject: [PATCH] Add back provider keys on TwoFactorProviders response (#4991) (cherry picked from commit b07df10335132831722b138fb4970dc624df1833) --- .../RequestValidators/TwoFactorAuthenticationValidator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Identity/IdentityServer/RequestValidators/TwoFactorAuthenticationValidator.cs b/src/Identity/IdentityServer/RequestValidators/TwoFactorAuthenticationValidator.cs index 323d09c0e213..4cabcf4fa71e 100644 --- a/src/Identity/IdentityServer/RequestValidators/TwoFactorAuthenticationValidator.cs +++ b/src/Identity/IdentityServer/RequestValidators/TwoFactorAuthenticationValidator.cs @@ -121,8 +121,8 @@ public async Task> BuildTwoFactorResultAsync(User use var twoFactorResultDict = new Dictionary { - { "TwoFactorProviders", null }, - { "TwoFactorProviders2", providers }, // backwards compatibility + { "TwoFactorProviders", providers.Keys }, // backwards compatibility + { "TwoFactorProviders2", providers }, }; // If we have email as a 2FA provider, we might need an SsoEmail2fa Session Token