feat(HAI-095): add authentication settings UI with backend API
- Add backend auth API endpoints (GET/PUT) with validation in routes.ts - Create frontend API client functions for fetching and updating auth config - Add Authentication Settings section to SettingsModal with token input form - Add comprehensive tests for routes, API client, and SettingsModal components - Wire up auth settings routes in dashboard server
This commit is contained in:
@@ -3,6 +3,7 @@ import { join, dirname } from "node:path";
|
||||
import { existsSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { TaskStore, MergeResult } from "@hai/core";
|
||||
import type { AuthStorageLike } from "./routes.js";
|
||||
import { createApiRoutes } from "./routes.js";
|
||||
import { createSSE } from "./sse.js";
|
||||
import { rateLimit, RATE_LIMITS } from "./rate-limit.js";
|
||||
@@ -14,6 +15,8 @@ export interface ServerOptions {
|
||||
onMerge?: (taskId: string) => Promise<MergeResult>;
|
||||
/** Maximum concurrent worktrees / execution slots (default 2) */
|
||||
maxConcurrent?: number;
|
||||
/** Optional AuthStorage instance for auth routes — if not provided, one is created internally */
|
||||
authStorage?: AuthStorageLike;
|
||||
}
|
||||
|
||||
export function createServer(store: TaskStore, options?: ServerOptions): ReturnType<typeof express> {
|
||||
|
||||
Reference in New Issue
Block a user