Files
metapi/src/server/desktop.ts
T
ciat-777 575a15232b feat: implement Codex OAuth flow with loopback callback server and management UI
- Add localCallbackServer for handling OAuth callback requests.
- Implement service functions for managing OAuth sessions and accounts.
- Create CodexAdapter for platform-specific interactions.
- Develop OAuthManagement page for managing OAuth connections and providers.
- Add tests for localCallbackServer and OAuthManagement components.
2026-03-17 11:07:25 +08:00

12 lines
374 B
TypeScript

import type { FastifyInstance } from 'fastify';
const DESKTOP_HEALTH_ROUTE = '/api/desktop/health';
export function isPublicApiRoute(url: string): boolean {
return url === DESKTOP_HEALTH_ROUTE || url.startsWith('/api/oauth/callback/');
}
export async function registerDesktopRoutes(app: FastifyInstance) {
app.get(DESKTOP_HEALTH_ROUTE, async () => ({ ok: true }));
}