mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-30 03:09:19 +01:00
* chore: add initial db migration * test: add unit tests for packages auth, common, widgets * fix: deep source issues * fix: format issues * wip: add unit tests for api routers * fix: deep source issues * test: add missing unit tests for integration router * wip: board tests * test: add unit tests for board router * fix: remove unnecessary null assertions * fix: deepsource issues * fix: formatting * fix: pnpm lock * fix: lint and typecheck issues * chore: address pull request feedback * fix: non-null assertions * fix: lockfile broken
13 lines
348 B
TypeScript
13 lines
348 B
TypeScript
import { randomUUID } from "crypto";
|
|
|
|
export const sessionMaxAgeInSeconds = 30 * 24 * 60 * 60; // 30 days
|
|
export const sessionTokenCookieName = "next-auth.session-token";
|
|
|
|
export const expireDateAfter = (seconds: number) => {
|
|
return new Date(Date.now() + seconds * 1000);
|
|
};
|
|
|
|
export const generateSessionToken = () => {
|
|
return randomUUID();
|
|
};
|