Skip to content

Commit 09a9c71

Browse files
committed
fix(auth): Allow 2FA challenges for Ephemeral sessions
Signed-off-by: Joas Schilling <[email protected]>
1 parent 2d0f50a commit 09a9c71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use OC\AppFramework\Utility\ControllerMethodReflector;
1111
use OC\Core\Controller\ClientFlowLoginV2Controller;
12+
use OC\Core\Controller\TwoFactorChallengeController;
1213
use OCP\AppFramework\Controller;
1314
use OCP\AppFramework\Http\Attribute\PublicPage;
1415
use OCP\AppFramework\Middleware;
@@ -32,8 +33,9 @@ public function beforeController(Controller $controller, string $methodName) {
3233
}
3334

3435
if (
35-
$controller instanceof ClientFlowLoginV2Controller &&
36-
($methodName === 'grantPage' || $methodName === 'generateAppPassword')
36+
$controller instanceof TwoFactorChallengeController
37+
|| ($controller instanceof ClientFlowLoginV2Controller
38+
&& ($methodName === 'grantPage' || $methodName === 'generateAppPassword'))
3739
) {
3840
return;
3941
}

0 commit comments

Comments
 (0)