Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

251
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda