Issue with cy.session and Auth0 Refresh Token: Authentication Fails on Page Reload

Thank you for the fast reply!

I indeed followed the documentation you linked. We are using the passwordles otp flow, therefore I also added a mail fetching task in-between. Everything works fine, when creating the session, he gets the mail, authenticates with the otp and the first it() works just fine with the session. But the second time the next it() tries to recreated the session, auth0 route guard says we are no longer authenticated and redirected us to the auth0 login page. But the session validation clearly says the cookie is there.

I added the testIsolated Setting in my Cypress Configuration but no success. Using this setting would also go against best practice. We want to be able to test in isolation.

Yes as you said yourself, information on the subject is somehow very scarce… It is blocking us hard right now.

cy.session() command will inherit the testIsolation value

Please correct me if I have misunderstood. But isn’t the goal of cy.session
exactly to restore the storage and cookies that were saved in the ID of the same id?

Maybe there is a problem with the memory cache that is used by Auth0 to store the authentication cookie - and cypress is not able to restore this state completely?

We don’t want the programatic login because it is not the intended way the user would use the application.