I have been able to setup 2FA for a user and add the 2FA to my Google Authenticator app. When attempting to login using the code, despite it being validated correctly by the Nuget package, the /umbraco/backoffice/umbracoapi/authentication/PostLogin endpoint returns a 402 Payment Required message, resulting in the user not getting redirect to the CMS.
Umbraco returns 402 error response when using 2FA in the backoffice
I'm trying to implement https://docs.umbraco.com/umbraco-cms/reference/security/two-factor-authentication#two-factor-authentication-for-users on Umbraco 12.3.3
I have been able to setup 2FA for a user and add the 2FA to my Google Authenticator app. When attempting to login using the code, despite it being validated correctly by the Nuget package, the /umbraco/backoffice/umbracoapi/authentication/PostLogin endpoint returns a 402 Payment Required message, resulting in the user not getting redirect to the CMS.
It looks to have been reported before, i.e. https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/92549-2fa-not-working-with-httperrors-existingresponse-replace but the answer in this post does not work for my version of Umbraco.
This was caused by https://github.com/umbraco/Umbraco-CMS/pull/15317
An upgrade to 12.3.4 https://our.umbraco.com/download/releases/1234 will fix this. (I upgraded to 12.3.6 and can confirm it works on that version too).
is working on a reply...