fix(electron): cookie expires too short (#6615)

This commit is contained in:
EYHN 2024-04-18 13:41:56 +00:00
parent 09832dc940
commit a537f8eb0b
No known key found for this signature in database
GPG Key ID: 46C9E26A75AB276C

View File

@ -89,7 +89,12 @@ async function handleOauthJwt(url: string) {
value: token, value: token,
secure: true, secure: true,
name: 'affine_session', name: 'affine_session',
expirationDate: Math.floor(Date.now() / 1000 + 3600 * 24 * 7), expirationDate: Math.floor(
Date.now() / 1000 +
3600 *
24 *
399 /* as long as possible, cookie max expires is 400 days */
),
}); });
let hiddenWindow: BrowserWindow | null = null; let hiddenWindow: BrowserWindow | null = null;