Files
duocthu/apps/web/app/api/auth/session.ts
T

6 lines
377 B
TypeScript

/** Shared between the login/logout/me route handlers and `middleware.ts` —
* kept dependency-free (no Node-only imports) so `middleware.ts` can import
* it too; Next's Edge runtime middleware can't use arbitrary Node APIs. */
export const SESSION_COOKIE = "dt_session";
export const SESSION_MAX_AGE_SECONDS = 12 * 60 * 60; // matches auth-service's default JWT_EXPIRES_IN