Gate admin menu and authoring with shared JWT

This commit is contained in:
2026-08-15 09:29:08 +02:00
parent eeaa4138fa
commit 8f1f5a8743
16 changed files with 366 additions and 52 deletions
+3
View File
@@ -1,6 +1,8 @@
import { defineConfig } from '@playwright/test'
import jwt from 'jsonwebtoken'
const port = 18788
const adminToken = jwt.sign({ sub: 'e2e-admin', role: 'admin' }, 'osint-e2e-jwt-secret')
export default defineConfig({
testDir: './e2e',
@@ -12,6 +14,7 @@ export default defineConfig({
baseURL: `http://127.0.0.1:${port}`,
headless: true,
viewport: { width: 1280, height: 720 },
extraHTTPHeaders: { Cookie: `auth_token=${adminToken}` },
},
webServer: {
command: 'npm run e2e:serve',