How to troubleshoot passcode issue?

Ismail Mohd asked on April 13, 2020 10:06

Hi,

I'm using Kentico 11 which was originally upgraded from K9, and K10. I implemented custom MFA where the passcode will be emailed to the user. I am able to log in as the user if MFA disabled. When I enable MFA for the user and try to log in, the passcode is sent to the user's email. But when I enter the passcode, the "Login_FailureText" value from CMS.resx is returned. The function that returns the error message is the "Login1_LoginError" method in "logon.aspx.cs".

Why does the passcode keep failing? I can't see any error message in the event logs and not sure how to troubleshoot. Let me know if any of you guys have any ideas on why my passcode keeps failing, thanks!

Recent Answers


Brenden Kehren answered on April 13, 2020 16:57

Have you attempted to debug your custom code to find out why the code is erroring out? I'm assuming it's somewhere in your custom MFA code that it is causing an error and simply bubbling it back up to the Login.aspx control's code.

0 votesVote for this answer Mark as a Correct answer

Ismail Mohd answered on April 16, 2020 04:30

Hi Brenden, thanks for your response. Am still in the process of debugging my custom code. Will try to update again soon as soon as I can.

0 votesVote for this answer Mark as a Correct answer

Ismail Mohd answered on May 13, 2020 08:08

So in K9 the passcode is just 5 digits... https://docs.kentico.com/k9/custom-development/handling-global-events/handling-custom-multi-factor-authentication But in K11, the passcode is using the default 6 digits... https://docs.kentico.com/k11/custom-development/handling-global-events/handling-custom-multi-factor-authentication

Once I removed the substring in my code, I was able to log in to the CMS with the passcode successfully.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.