Cypress Tests become flaky after switching from Okta to Auth0

I have a React app, and normally the tests work like clockwork. However, we’re switching authentication providers from Okta to Auth0. Currently, we have a separate branch from our main one where we’ve swapped out all the Okta stuff for Auth0. This includes adding the proper environment variables. I can locally run the tests on the Auth0 branch successfully. The same tests run fine in CircleCI on the main branch with Okta. The problem is in CircleCI they become slow and flaky. In the videos under the artifacts tab, I notice things like the tests hanging on the Auth0 universal login page, and on some successful logins but not all the time, the app just rerendering over and over again. What’s going on?

1 Like