MCPcopy Create free account
hub / github.com/ShipSecAI/studio / getSessionSecret

Function getSessionSecret

backend/src/auth/session.utils.ts:7–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5export const SESSION_COOKIE_MAX_AGE = 7 * 24 * 60 * 60 * 1000; // 7 days
6
7function 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
18export interface SessionPayload {
19 username: string;

Callers 2

createSessionTokenFunction · 0.85
verifySessionTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected