Fix token cookie not being peristed on browser reboot (#2667)

This commit is contained in:
Charles Bochet
2023-11-23 12:16:20 +01:00
committed by GitHub
parent 01172d44dd
commit 9c4f402102
2 changed files with 3 additions and 3 deletions

View File

@ -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),
});
});
};