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 | 9c3000e755baeeb19a9c0f88ccf7470a752de40a (patch) | |
| tree | adb4e42b68fb2168c8597a2284c8ff9048acc637 /src/lib/utils.js | |
| parent | 18efd3bec24d2beb1fcb5ffa5e4492af7fc3e1df (diff) | |
| download | coinos-ui-9c3000e755baeeb19a9c0f88ccf7470a752de40a.tar.gz coinos-ui-9c3000e755baeeb19a9c0f88ccf7470a752de40a.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')}` }); |
