I tried ctx.cookies.set('jwt', null), but the cookie still there.
I found it worked in browser, but not worked in Postman, erm..
just set a outdated expire date
@luckydrq I know the way you said, ctx.cookies.set('jwt', null) this code works, but only in browser, I found that is Postman's bug.
ok, but what is Postman?
@luckydrq It's a tool to test api, here
@luckydrq I know the way you said, ctx.cookies.set('jwt', null)
yeath, you're right. It's the same as set a outdated date. I've found the clue: https://github.com/pillarjs/cookies/blob/master/lib/cookies.js#L113
For anyone arrive here, ctx.cookies.set('jwt', null) works in postman now.
ctx.cookies.set(cookieName, '');
actually, looks like it's just ctx.cookies.set(cookieName)
ok, but what is Postman?
https://www.getpostman.com/ It's a good tool for testing api
ok, but what is Postman?
https://www.getpostman.com/ It's a good tool for testing api
restlet client run in chrome,this is better
actually, looks like it's just
ctx.cookies.set(cookieName)
this is correct, per the documentation for cookies.set
If the _value_ is omitted, an outbound header with an expired date is used to delete the cookie.
Most helpful comment
For anyone arrive here,
ctx.cookies.set('jwt', null)works in postman now.