feat(auth): extend API key authentication to tRPC endpoints (#4732)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matti Airas
2026-01-05 19:43:17 +02:00
committed by GitHub
parent c8ecf5f0a1
commit 0dc61a88b8
10 changed files with 246 additions and 72 deletions

View File

@@ -1,5 +1,7 @@
import { generateOpenApiDocument } from "trpc-to-openapi";
import { API_KEY_HEADER_NAME } from "@homarr/auth/api-key";
import { appRouter } from "./root";
export const openApiDocument = (base: string) =>
@@ -11,7 +13,7 @@ export const openApiDocument = (base: string) =>
securitySchemes: {
apikey: {
type: "apiKey",
name: "ApiKey",
name: API_KEY_HEADER_NAME,
description: "API key which can be obtained in the Homarr administration dashboard",
in: "header",
},