Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

EYHNa537f8eb0bab
diff --git a/packages/frontend/electron/src/main/deep-link.ts b/packages/frontend/electron/src/main/deep-link.ts
index 7275ae5399..e0c88af7fb 100644
--- a/packages/frontend/electron/src/main/deep-link.ts
+++ b/packages/frontend/electron/src/main/deep-link.ts
@@ -89,7 +89,12 @@ async function handleOauthJwt(url: string) {
value: token,
secure: true,
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;