The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix token cookie not being peristed on browser reboot (#2667)
Charles Bochet9c4f402102e1
diff --git a/front/src/utils/recoil-effects.ts b/front/src/utils/recoil-effects.tsindex 6268b06cebf..909c5e94183 100644--- a/front/src/utils/recoil-effects.ts+++ b/front/src/utils/recoil-effects.ts@@ -32,6 +32,8 @@ export const cookieStorageEffect =}isReset? cookieStorage.removeItem(key)- : cookieStorage.setItem(key, JSON.stringify(newValue));+ : cookieStorage.setItem(key, JSON.stringify(newValue), {+ expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 7),+ });});};diff --git a/server/src/core/auth/services/auth.service.ts b/server/src/core/auth/services/auth.service.tsindex 1de649cfcb1..2ceca425393 100644--- a/server/src/core/auth/services/auth.service.ts+++ b/server/src/core/auth/services/auth.service.ts@@ -169,8 +169,6 @@ export class AuthService {user.passwordHash = '';user.workspaceMember = await this.userService.loadWorkspaceMember(user);- console.log(user.workspaceMember);-const accessToken = await this.tokenService.generateAccessToken(user.id);const refreshToken = await this.tokenService.generateRefreshToken(user.id);