Open Closed

2FA Still Not Working After Applying Changes From #3754 #10613


0
SelfSwapAdmin created

ASP.NET Zero 10.2 Angular 10/.NET Core 5

Earlier today upon testing it for the first time in my application, I discovered that 2FA is not working. The exception “Security code cannot be sent!” is being thrown by TokenAuthController due to the CacheItem being null after the call to the CacheManager. Upon researching this I discovered that the problem was originally reported earlier this year on a 10. 0 Angular/Core solution (https://support.aspnetzero.com/QA/Questions/9970/Two-factor-code-caching). The problem was acknowledged as a bug and supposedly fixed in #3754 which was closed on February 2, 2021 to be included in 10. 5. It was recommended to the original submitter to apply the changes of #3754 to fix the problem on their 10 solution. I just carefully applied those changes myself to my 10. 2 solution, but it has not corrected the problem so far of the null CacheItem.

I see there was some backtracking of earlier changes in the final commit. It appeared to me that the final change set in #3754 was incomplete or invalid as there was an import added into the send-two-factor-code.component.ts for the validate-two-factor-code.component.ts, but is unreferenced and unused there. It was used and an earlier change set that was backtracked. I don't if I have something wrong or not, but I think the solution that was posted in GitHub is incomplete or confusing at least. I really need to get this working ASAP without spending a lot more additional time on it. I have attached Git diff screenshots of all my changes. What is wrong or missing? Is there anything else I need to do or specific ways to test this while running in my development environment? My app logs in fine with 2FA disabled and these changes below in effect. Thank you.


5 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @SelfSwapAdmin

    Is it possible to share your project with info@aspnetzero.com ? We can fix the problem for you faster in that way.

    Thanks,

  • 0
    SelfSwapAdmin created

    It will be zipped with the following password: @^'CzNrY@:y}7t+j

    Please delete our files when done using them. Thank you.

  • 0
    ismcagdas created
    Support Team

    Hi @SelfSwapAdmin

    We haven't received the files yet. Did you send it ?

    Thanks,

  • 0
    SelfSwapAdmin created

    The files were delivered 2 days ago. Could you please beging working on this support request? Thank you.

  • 0
    ismcagdas created
    Support Team

    Hi @SelfSwapAdmin

    Sorry for my late reply. We had an issue with our support website and couldn't see your question as an open ticket. Did you solve this problem ?

    Thanks,