set cookie expiration time

This commit is contained in:
Max Alekseenko
2024-12-23 15:37:28 +01:00
committed by tom goriunov
parent 8f069f995f
commit 1322414364
+1 -1
View File
@@ -138,7 +138,7 @@ export function RewardsContextProvider({ children }: Props) {
// Save the API token to cookies and state
const saveApiToken = useCallback((token: string | undefined) => {
if (token) {
cookies.set(cookies.NAMES.REWARDS_API_TOKEN, token);
cookies.set(cookies.NAMES.REWARDS_API_TOKEN, token, { expires: 365 });
} else {
cookies.remove(cookies.NAMES.REWARDS_API_TOKEN);
}