mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
revert: remove MFA skip for impersonation (not a regression)
This commit is contained in:
1 parent
a7c753e536
commit
e8240fa547
1 file changed
+1
-2
@@ -475,8 +475,7 @@ Http::init()
|
||||
$minimumFactors = ($mfaEnabled && $hasMoreFactors) ? 2 : 1;
|
||||
|
||||
// Step 13: Handle Multi-Factor Authentication
|
||||
// Skip MFA check when impersonating — the actor already satisfied their own MFA during login.
|
||||
if (! in_array('mfa', $route->getGroups()) && $impersonatorUser->isEmpty()) {
|
||||
if (! in_array('mfa', $route->getGroups())) {
|
||||
if ($session && \count($session->getAttribute('factors', [])) < $minimumFactors) {
|
||||
throw new Exception(Exception::USER_MORE_FACTORS_REQUIRED);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user