From 31e14e7bae60c8320e6552c65db3aff8a275533b Mon Sep 17 00:00:00 2001 From: mrflick72 Date: Sat, 27 Jul 2024 10:06:16 +0200 Subject: [PATCH] mfa ui fix: now it is capable to pass the mfa-method field fixed to email (that is the only mfa supported right now) --- src/main/frontend/app/mfa/index.tsx | 1 + .../com/vauthenticator/server/mfa/web/MfaController.kt | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/app/mfa/index.tsx b/src/main/frontend/app/mfa/index.tsx index b44a2218..61d07bc7 100644 --- a/src/main/frontend/app/mfa/index.tsx +++ b/src/main/frontend/app/mfa/index.tsx @@ -75,6 +75,7 @@ const MfaChallengePage: React.FC = ({ rawI18nMessages,raw {
+ , authentication: Authentication, request: HttpServletRequest, response: HttpServletResponse ) { try { - otpMfaVerifier.verifyMfaChallengeFor(authentication.name, mfaMethod, mfaChannel, MfaChallenge(mfaCode)) + val mfaChannel2 = mfaChannel.orElseGet { authentication.name } + otpMfaVerifier.verifyMfaChallengeFor(authentication.name, mfaMethod, mfaChannel2, MfaChallenge(mfaCode)) publisher.publishEvent(MfaSuccessEvent(authentication)) nextHopeLoginWorkflowSuccessHandler.onAuthenticationSuccess(request, response, authentication) } catch (e: Exception) {