Skip to content

Conversation

@mitchellderijcke
Copy link

I noticed that in one case koa-session tries to use cookies when you specified an externalKey: when destroying the session.

This simple fix should mitigate that by respecting the externalKey when removing sessions.

@coveralls
Copy link

coveralls commented May 3, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 2df2e36 on rijx:fix/consistent-external-key into 5ca903f on koajs:master.

if (externalKey) await this.store.destroy(externalKey);
ctx.cookies.set(key, '', opts);

if (opts.externalKey) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test case for this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants