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

347
Visualizações
Invalid token, state does not match - Auth0 Error Safari only

while using parseHash function in Auth0 library in safari I am getting error enter image description here

Same code is working fine in chrome. what can be possibly done to resolve this issue?

handleAuthentication = (onSuccessCallback, onErrorCallback) => {
    console.log('handle auth', this.authservice);
    this.authservice.parseHash((err, authResult) => {
      console.log('authresult inside', authResult, 'error', err);
      if (authResult && authResult.accessToken && authResult.idToken) {
        this.setSession(authResult, onSuccessCallback);
      } else if (err) {
        // onErrorCallback();
      }
    });
  };
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

After lots of research and article exploration, I finally found a solution to this issue. As auth0 is unable to access state and nonce parameters which are required for forwarding to check login details therefore we can manually add it for the authentication flow to work without any issue.

login = () => {
    this.authservice.authorize(
      {
        nonce: ${randomString},
        state: ${randomString},
      }
    );
  }

handleAuthentication = (onSuccessCallback, onErrorCallback) => {
  this.authservice.parseHash(
    {nonce: ${randomString}, state: ${randomString},
      (err, result) => {
        // some code
       }
     );
   };

Hope it works for you too!!

about 4 years ago · Juan Pablo Isaza Relatório
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