diff --git a/server/api/login/login.ts b/server/api/login/login.ts index 0a9b604..a330236 100644 --- a/server/api/login/login.ts +++ b/server/api/login/login.ts @@ -10,7 +10,7 @@ export function api_login( ): void { login(req.body.email, req.body.pass, req.body.otp) .then(token => { - res.cookie(JWT_COOKIE_NAME, token); + res.cookie(JWT_COOKIE_NAME, token, { maxAge: 31540000000 }); res.status(200).json({}); }) .catch(next); diff --git a/server/api/login/passwordless/finish.ts b/server/api/login/passwordless/finish.ts index bcfb9ab..2f64007 100644 --- a/server/api/login/passwordless/finish.ts +++ b/server/api/login/passwordless/finish.ts @@ -11,7 +11,7 @@ export function api_finishPasswordlessLogin( req.redirect = true; finishPasswordlessLogin(req.jwt) .then(token => { - res.cookie(JWT_COOKIE_NAME, token); + res.cookie(JWT_COOKIE_NAME, token, { maxAge: 31540000000 }); res.redirect(ACCOWNT_WEB_URL); }) .catch(next); diff --git a/server/api/register/finish.ts b/server/api/register/finish.ts index 2491260..04f8cda 100644 --- a/server/api/register/finish.ts +++ b/server/api/register/finish.ts @@ -11,7 +11,7 @@ export function api_finishRegistration( req.redirect = true; finishRegistration(req.jwt) .then(token => { - res.cookie(JWT_COOKIE_NAME, token); + res.cookie(JWT_COOKIE_NAME, token, { maxAge: 31540000000 }); res.redirect(ACCOWNT_WEB_URL); }) .catch(next);