Cypress Auth0 login invalid token state does not match

Need help with cypress testing on Auth0. I implemented this: End-to-End Testing with Cypress and Auth0 login using Cypress with a minor difference. Instead of Resource Owner Password Grant, I used realm: ‘Username-Password-Authentication’. I don’t think that is causing the issue since it’s responding with an access_token. It appears the problem is caused by the win.document.cookie = ‘com.auth0.auth.some-random-state=’ + JSON.stringify(auth0State). Auth0 is saying the state does not match. Please help.

Additional info: We are implementing this on Angular 6 with the app doing Auth0 silent authentication.

1 Like