Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

250
Vistas
Why i am getting Uncaught (in promise) Error: Multifactor authentication required

I configure my auth0 provider and login with redirect like below

// auth0-provider-with-history.js

const Auth0ProviderWithHistory = ({ children }) => {
  const domain = process.env.REACT_APP_AUTH0_DOMAIN;
  const clientId = process.env.REACT_APP_AUTH0_CLIENT_ID;
  const audience = process.env.REACT_APP_AUTH0_API_AUDIENCE;
  const navigate = useNavigate();

  const onRedirectCallback = (appState) => {
    navigate(appState?.returnTo || window.location.pathname);
  };

  return (
    <Auth0Provider
      domain={domain}
      clientId={clientId}
      redirectUri={window.location.origin}
      onRedirectCallback={onRedirectCallback}
      audience={audience}
      useRefreshTokens={true}
      scope="openid profile email read:current_user"
    >
      {children}
    </Auth0Provider>
  );
};
// profile.js

const { isLoading, loginWithRedirect, isAuthenticated, user, getAccessTokenSilently } = useAuth0();
  React.useEffect(() => {
    if (isLoading || isAuthenticated)return;
    loginWithRedirect({
      scope: "openid profile email read:current_user",

    });
  }, [isLoading, isAuthenticated, loginWithRedirect]);

and below is the rule i am using to enable MFA for the react SPA client

function multifactorAuthentication(user, context, callback) {
    if (context.clientID === 'MY_CLIENT_ID'){
    context.multifactor = {
      provider: 'any',
      allowRememberBrowser: false
    };
  }

  callback(null, user, context);
}

but i am getting the below error after submitting the OTP code and it again redirecting me to the verification code page.

Uncaught (in promise) Error: Multifactor authentication required Error Screenshort enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda