diff options
| author | Adam Soltys <[email protected]> | 2022-10-31 10:37:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-31 10:37:40 -0700 |
| commit | 175d8c396f36a0d04f43cad5abd738bc9ffdbe58 (patch) | |
| tree | adb4e42b68fb2168c8597a2284c8ff9048acc637 /src/lib/utils.js | |
| parent | 7bd39ca6f942c146a6e21be625c03bef84c1d3ee (diff) | |
| download | coinos-ui-175d8c396f36a0d04f43cad5abd738bc9ffdbe58.tar.gz coinos-ui-175d8c396f36a0d04f43cad5abd738bc9ffdbe58.zip | |
set cookie expiry to a month
Diffstat (limited to 'src/lib/utils.js')
| -rw-r--r-- | src/lib/utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index 38999a91..41435bf6 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -125,7 +125,7 @@ export const login = async (user, cookies) => { let expires = new Date(); expires.setSeconds(expires.getSeconds() + maxAge); - cookies.set('token', token, { path: '/' }); + cookies.set('token', token, { path: '/', expires }); }; export const auth = (cookies) => ({ authorization: `Bearer ${cookies.get('token')}` }); |
