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.
If a cookie is created dynamically as such:
It is not possible to delete the cookie later by using:
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:
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.