Fixes: handling of www subdomain in production

Hanging sessions when subdomain changes
This commit is contained in:
Tom Moor
2018-11-13 23:08:27 -08:00
parent 400d0f264e
commit 26036ad92c
3 changed files with 8 additions and 5 deletions

View File

@ -115,11 +115,10 @@ export default function auth(options?: { required?: boolean } = {}) {
const existing = JSON.parse(ctx.cookies.get('sessions') || '{}');
const sessions = JSON.stringify({
...existing,
[team.subdomain]: {
[team.id]: {
name: team.name,
logoUrl: team.logoUrl,
url: team.url,
expires,
},
});
ctx.cookies.set('sessions', sessions, {