Skip to content

Commit

Permalink
Merge pull request #15 from AplinkosMinisterija/cookies
Browse files Browse the repository at this point in the history
Cookies
  • Loading branch information
DovMa authored Jun 26, 2023
2 parents 8c8ee84 + b3203f1 commit 62cf8b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ export const handleUpdateTokens = (data: UpdateTokenProps) => {
if (token) {
cookies.set("token", `${token}`, {
path: "/",
expires: new Date(new Date().getTime() + 60 * 60 * 24 * 1000)
expires: new Date(new Date().getTime() + 60 * 60 * 24 * 1000),
});
}

if (refreshToken) {
cookies.set("refreshToken", `${refreshToken}`, { path: "/" });
cookies.set("refreshToken", `${refreshToken}`, {
path: "/",
expires: new Date(new Date().getTime() + 60 * 60 * 24 * 1000*30),
});
}
};

Expand Down

0 comments on commit 62cf8b0

Please sign in to comment.