identify: validate mfa methods against user's enabled methods

This commit is contained in:
Abdullah Atta committed 2025-04-30 11:48:50 +05:00
1 parent 8d3b0d6dbf
commit 182558136a
1 file changed
+1 -1
@@ -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;