feat: implement refresh cookie on frontend

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-03-05 17:35:28 +01:00
parent 19d00fe372
commit de083201d2
4 changed files with 117 additions and 23 deletions
@@ -295,8 +295,8 @@ export async function createRouter(
router.use('/static/docs', publisher.docsRouter());
// Endpoint that sets the cookie for the user
router.get('/cookie', async (req, res) => {
const { expiresAt } = await httpAuth.issueUserCookie(req);
router.get('/cookie', async (_, res) => {
const { expiresAt } = await httpAuth.issueUserCookie(res);
res.json({ expiresAt: expiresAt.toISOString() });
});