mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-27 14:24:06 +03:00
Fix token cookie not being peristed on browser reboot (#2667)
This commit is contained in:
parent
01172d44dd
commit
9c4f402102
@ -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),
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user