SPB Git

spb/rareindex

Public
359 B · 6 lines typescript
1/** Print the admin cookie value for scripted access: scripts/with-env.sh pnpm tsx scripts/admin-cookie.ts */2import { createHmac } from 'node:crypto';3const token = process.env.ADMIN_TOKEN;4if (!token) throw new Error('ADMIN_TOKEN not set');5console.log(createHmac('sha256', process.env.SESSION_SECRET ?? 'dev-only').update(`admin:${token}`).digest('hex'));6
Files · b5d6968a47f5d2546937866bdabc967739349047
Menu

Theme