* Helper to set the session cookie with consistent options
(res: Response, sealedSession: string)
| 550 | * Helper to set the session cookie with consistent options |
| 551 | */ |
| 552 | function setSessionCookie(res: Response, sealedSession: string) { |
| 553 | res.cookie('wos-session', sealedSession, { |
| 554 | httpOnly: true, |
| 555 | secure: process.env.NODE_ENV === 'production' && !ALLOW_INSECURE_COOKIES, |
| 556 | sameSite: 'lax', |
| 557 | path: '/', |
| 558 | maxAge: 7 * 24 * 60 * 60 * 1000, // 7 days |
| 559 | }); |
| 560 | } |
| 561 | |
| 562 | // Static admin API key for internal tooling (bypasses WorkOS) |
| 563 | const ADMIN_API_KEY = process.env.ADMIN_API_KEY; |
no outgoing calls
no test coverage detected