koajs / koajs/session

one of the 2 cookies are not cleared

Open
#172 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
908
Forks
115
PR merge metrics
No merged PRs in 30d

Description

Say cookie name is `foo`. When you do `ctx.session = null;`, on client side, the cookie `foo.sig` is cleared, the cookie `foo` is still there with its original value.

Why is it done this way? How to do a full clean?

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported case in the session middleware by setting ctx.session to null and comparing the client-side foo and foo.sig cookies. Inspect the cookie-clearing path to determine why only one cookie is removed; done means both cookies are fully cleared and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.