()
| 5 | export const SESSION_COOKIE_MAX_AGE = 7 * 24 * 60 * 60 * 1000; // 7 days |
| 6 | |
| 7 | function getSessionSecret(): string { |
| 8 | const secret = process.env.SESSION_SECRET; |
| 9 | if (!secret) { |
| 10 | if (process.env.NODE_ENV === 'production') { |
| 11 | throw new Error('SESSION_SECRET is required in production for session authentication'); |
| 12 | } |
| 13 | return 'local-dev-session-secret'; |
| 14 | } |
| 15 | return secret; |
| 16 | } |
| 17 | |
| 18 | export interface SessionPayload { |
| 19 | username: string; |
no outgoing calls
no test coverage detected