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

it is not possible to unstate a cookie that was stated with options #2068

Closed
csrl opened this issue Oct 30, 2014 · 0 comments
Closed

it is not possible to unstate a cookie that was stated with options #2068

csrl opened this issue Oct 30, 2014 · 0 comments
Labels
Milestone

Comments

@csrl
Copy link

@csrl csrl commented Oct 30, 2014

If a cookie is created dynamically as such:

reply.state('session', sessionId, {path: '/auth'});

It is not possible to delete the cookie later by using:

reply.unstate('session');

As the expired cookie that is generated from the unstate call does not contain a matching path so the browser does not remove the first cookie.

However, if the cookie is first registered like so:

plugin.state('session', {path: '/auth'});

Then it can be unstated successfully as needed.

So reply.unstate() could be given an optional options parameter in order to generate the same cookie context for dynamically managing cookies.

Thank you.

@hueniverse hueniverse added the bug label Oct 31, 2014
@hueniverse hueniverse added this to the 7.4.1 milestone Nov 7, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
@lock lock bot unassigned arb Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants