Commit 212ddffc authored by Max Alekseenko's avatar Max Alekseenko Committed by tom goriunov

set cookie expiration time

parent 0f237c4b
...@@ -138,7 +138,7 @@ export function RewardsContextProvider({ children }: Props) { ...@@ -138,7 +138,7 @@ export function RewardsContextProvider({ children }: Props) {
// Save the API token to cookies and state // Save the API token to cookies and state
const saveApiToken = useCallback((token: string | undefined) => { const saveApiToken = useCallback((token: string | undefined) => {
if (token) { if (token) {
cookies.set(cookies.NAMES.REWARDS_API_TOKEN, token); cookies.set(cookies.NAMES.REWARDS_API_TOKEN, token, { expires: 365 });
} else { } else {
cookies.remove(cookies.NAMES.REWARDS_API_TOKEN); cookies.remove(cookies.NAMES.REWARDS_API_TOKEN);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment