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

348
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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