Problem with MFA error "login_required"

Hi!

We are trying to implement Auth0 with MFA in a Gatsby JS React app. Unfortunately we are encountering an issue, where when you try to authenticate via MFA, the following error is thrown

code: "login_required"
description: "Multifactor authentication required"
error: "login_required"
error_description: "Multifactor authentication required"
original:
  error: "login_required"
  error_description: "Multifactor authentication required"

and are prompted to login once again (so you end up in an endless loop of logins).
The only workaround that would work, is when the “remember this browser” option is checked during MFA.

After doing some research to fix this bug the only “solution” I saw, was disabling MFA which is obviously not our intention.

Any help, tip or feedback would be greatly appreciated :slight_smile:

Hey @rs3, Welcome to the Auth0 Community!

From the log it looks like you are using the silent authentication with MFA enabled.
We have the following advice on this:

MFA will be prompted once per session in the above case.

Let me know if this helps!

Regards,
Sid

Hey Sid!

Thanks for your reply :dog:

I’m sorry if I didn’t specify the issue clearly, but the problem is not that you’re prompted to authenticate once every session. When logging in, the user is prompted to input email and password, if those are correct the user is prompted to enter the 2FA code. Once the code was entered, the user should be redirected to the platform, but instead is prompted to enter email and password. So basically an endless loop of logging in. The only way to properly log in and actually get to the platform is to check “remember this browser”, but this isn’t necessarily desired.

Regards :dog:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.