Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

349
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!