Files
madbase/tests/integration/generate_keys.test.ts
Vlad Durnea a66d908eff
Some checks failed
CI / podman-build (push) Has been cancelled
CI / rust (push) Has been cancelled
chore: full stack stability and migration fixes, plus react UI progress
2026-03-18 09:01:38 +02:00

14 lines
487 B
TypeScript

import { describe, it } from 'vitest';
import jwt from 'jsonwebtoken';
describe('Generate Keys', () => {
it('should generate keys', () => {
const secret = 'supersecret1234567890123456789012';
const anon = jwt.sign({ role: 'anon', iss: 'madbase' }, secret, { algorithm: 'HS256' });
const service = jwt.sign({ role: 'service_role', iss: 'madbase' }, secret, { algorithm: 'HS256' });
console.log(`ANON_KEY=${anon}`);
console.log(`SERVICE_KEY=${service}`);
});
});