Cookies are not set if authentication service is on a different port than web app #3281
Labels
stage: proposal 💡
No work has been done of this issue
topic: cookies 🍪
type: unexpected behavior
User expected result, but got another
Current behavior:
Our application has separate services responsible for authentication and delivering our web app. On local environment that would be
localhost:4100
andlocalhost:3000
.baseUrl
is set tolocalhost:3000
Running this code in tests fails:
It would seem that
cypress.request()
on purpose isolates cookies between different ports of the same domain?Desired behavior:
As this works in Chrome or any tested (Firefox, Safari, Edge - to be explicit :-) ) other browser, I think
cookies should be set, as described e.g. in this answer
If a global change would be an issue, maybe
localhost
could be an exemption?Steps to reproduce:
baseUrl
set-cookie
cy.getCookies()
returns empty arrayVersions
Cypress v 3.1.4
macOS 10.14.2
Chrome 71.0.3578.98
The text was updated successfully, but these errors were encountered: