Green Code
Green Code

Reputation: 31

Invalid state when i come back on a auth0 private route on a React application

I’ve followed this article exactly : https://auth0.com/docs/quickstart/spa/react/01-login#protect-application-routes to implement auth0 on a react application. When i refresh a page (F5) that’s correspond to a private route, here the message i have : “Unhandled Rejection (Error): Invalid state”.

see error message screen : (Error): Invalid state

If i refresh this type of url : http://localhost:3000/order-m, that’s works correctly but if i refresh this type of url : http://localhost:3000/order-m?code=C_sS_Vc-rRrQOE-R&state=c3dCc3RCN1N2NHJEeFdzYlA5bDdZSlZDQmM4VTNKZ1FOYTMub29VRGpVag%3D%3D, i get a bug.

Thank you very much.

Upvotes: 3

Views: 952

Answers (1)

Anuj Sachan
Anuj Sachan

Reputation: 45

I think it's AUTH0 Issue, I also have same issue. I am removing the query parameter from URL to prevent the error.

Upvotes: 1

Related Questions