From 80eedf744944769c8ba9bbdccc2aa7dad06b2151 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 20 Mar 2020 13:56:22 +0900 Subject: 連携ログインができないのなどを修正 (#6162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 連携ログインができないのを修正 * Cookie名変更, セッションに * igiはやっぱり非セッションCookieで * 2回目以降Discordログインできなくなるのを修正 --- src/server/api/common/signin.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/server/api/common') diff --git a/src/server/api/common/signin.ts b/src/server/api/common/signin.ts index aa2786f8fc..50f79f1919 100644 --- a/src/server/api/common/signin.ts +++ b/src/server/api/common/signin.ts @@ -9,16 +9,12 @@ import { publishMainStream } from '../../../services/stream'; export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) { if (redirect) { //#region Cookie - const expires = 1000 * 60 * 60 * 24 * 365; // One Year - ctx.cookies.set('i', user.token, { + ctx.cookies.set('igi', user.token, { path: '/', - domain: config.hostname, // SEE: https://github.com/koajs/koa/issues/974 // When using a SSL proxy it should be configured to add the "X-Forwarded-Proto: https" header secure: config.url.startsWith('https'), - httpOnly: false, - expires: new Date(Date.now() + expires), - maxAge: expires + httpOnly: false }); //#endregion -- cgit v1.2.3-freya