Big thanks @KATT for this solution. I was breaking my head with this thing
BTW, maybe I’m missing something but I was able to simulate authenticated user just by doing the following:
- Log in to the app in a different browser
- Copy the value of @@auth0spajs@@
- Change the expiresAt to 2612051263
So my test is basically this:
it(‘Check user is logged in’, () => {
localStorage.setItem(“@@auth0spajs@@::<client_id>::::openid profile email”, <THE VALUE I COPIED AND CHANGED IT’S expiresAt>)
cy.visit(“http://localhost:3000”)
})
This worked for me and the user was logged in at the front.