identify: validate mfa methods against user's enabled methods

This commit is contained in:
Abdullah Atta
2025-04-30 11:48:50 +05:00
parent 8d3b0d6dbf
commit 182558136a

View File

@@ -84,7 +84,7 @@ namespace Streetwriters.Identity.Validation
var mfaCode = context.Request.Raw["mfa:code"];
var mfaMethod = context.Request.Raw["mfa:method"];
if (string.IsNullOrEmpty(mfaCode) || !MFAService.IsValidMFAMethod(mfaMethod))
if (string.IsNullOrEmpty(mfaCode) || !MFAService.IsValidMFAMethod(mfaMethod, user))
{
var sendPhoneNumber = primaryMethod == MFAMethods.SMS || secondaryMethod == MFAMethods.SMS;