Update app/controllers/shared/api.php
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue