Auth0 Home Blog Docs

Cypress Auth0 login invalid token state does not match

Need help with cypress testing on Auth0. I implemented this: https://auth0.com/blog/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.