mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update app/controllers/shared/api.php
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3d17b64eac
commit
089af4e137
@@ -290,7 +290,7 @@ App::init()
|
||||
$minimumFactors = ($mfaEnabled && $hasMoreFactors) ? 2 : 1;
|
||||
|
||||
if (!in_array('mfa', $route->getGroups())) {
|
||||
if ($session && !empty($session->getAttribute('factors')) && \count($session->getAttribute('factors')) < $minimumFactors) {
|
||||
if ($session && \count($session->getAttribute('factors', [])) < $minimumFactors) {
|
||||
throw new Exception(Exception::USER_MORE_FACTORS_REQUIRED);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user