Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow setting hostOnly cookie on thirdparty domain #17527

Closed
kuceb opened this issue Jul 29, 2021 · 1 comment · Fixed by #25853
Closed

allow setting hostOnly cookie on thirdparty domain #17527

kuceb opened this issue Jul 29, 2021 · 1 comment · Fixed by #25853
Assignees
Labels
topic: cookies 🍪 type: feature New feature that does not currently exist

Comments

@kuceb
Copy link
Contributor

kuceb commented Jul 29, 2021

Current behavior

Currently cy.setCookie hostOnly is controlled by the domain property. If omitted, the cookie will be set as hostOnly

However, because thirdparty cookies must have domain set for the user to specify which domain they want the cookie set on, it's impossible to set a hostOnly thirdparty cookie through the cy.setCookie api.

Similarly, users cant tell if a cookie is hostOnly on from the cy.getCookie api because domain exists in the cookie properties for both hostOnly and non-hostOnly cookies

Desired behavior

add a hostOnly property to cy.setCookie and cy.getCookie to allow users to set/distinguish a hostOnly cookie

Test code to reproduce

cy.setCookie({ domain: 'example.com' }) // sets non-hostOnly cookie

Cypress Version

1

Other

No response

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 25, 2023

Released in 12.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.7.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: cookies 🍪 type: feature New feature that does not currently exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants