import { randomBytes } from 'crypto' /** * Process-internal secret shared between: * - server/api/idempiere-auth/login.post.ts (the only caller) * - server/api/idempiere-auth/auto-defaults.post.ts (the privileged read) * * Generated once per Node process at module load. Because it lives only in * memory, external callers can never know it — which is what gates the * auto-defaults endpoint to "auto-finalize use only". */ export const AUTO_FINALIZE_SECRET = randomBytes(32).toString('hex')