sir-dunxalot / cypress-nextjs-auth0

Cypress commands to support Auth0 and Next.js
60 stars 24 forks source link

`login` command doesn't bypass already logged in user for chunked cookies #63

Open Tbhesswebber opened 2 years ago

Tbhesswebber commented 2 years ago

For months now, I have been wondering why cy.login seems to log me out and then back in every single time. Turns out, our cookie is chunked, so looking for the cookie using the env var results in cy.cookie not finding the cookie since every one has a number appended to the end.

https://github.com/sir-dunxalot/cypress-nextjs-auth0/blob/2ccb99f3ad5c99637ba5b41185e87d838e6d1864/src/commands/login.js#L16-L21