From 19b9cb105d49e2a00ae19e3dc1f2d36dc394f148 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Mon, 26 Mar 2018 00:19:07 +0900 Subject: Introduce account document to user document An account document is attached to a user document if an account of the user is on the server. It may be missing if the user is on a remote server. --- src/api/common/signin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/common') diff --git a/src/api/common/signin.ts b/src/api/common/signin.ts index 693e62f39f..c069fa4ec8 100644 --- a/src/api/common/signin.ts +++ b/src/api/common/signin.ts @@ -2,7 +2,7 @@ import config from '../../conf'; export default function(res, user, redirect: boolean) { const expires = 1000 * 60 * 60 * 24 * 365; // One Year - res.cookie('i', user.token, { + res.cookie('i', user.account.token, { path: '/', domain: `.${config.host}`, secure: config.url.substr(0, 5) === 'https', -- cgit v1.2.3-freya