auth-product-retired.ts34 lines · main
1/**
2 * Customer Auth product paths that stay closed (Option B Phase 1).
3 * Status shell is mounted separately: GET /v1/auth-core/info|ready|map.
4 * Does NOT touch platform operator login (`/v1/auth/*` Better Auth).
5 */
6
7import { Hono } from 'hono';
8
9import type { AppEnv } from '../types/app-env.js';
10
11export const authProductRetiredRouter = new Hono<AppEnv>();
12
13const GONE = {
14 code: 'auth_product_path_closed',
15 message:
16 'This Auth dashboard path is not open yet. App login uses /v1/auth-core/fdi/*. Platform sign-in (briven.tech) is unchanged.',
17 product: 'Briven Auth',
18 engine: 'briven-engine',
19} as const;
20
21// Old Better Auth multi-tenant customer product
22authProductRetiredRouter.all('/v1/auth-tenant/*', (c) => c.json(GONE, 410));
23authProductRetiredRouter.all('/v1/auth-v2/*', (c) => c.json(GONE, 410));
24authProductRetiredRouter.all('/v1/projects/:id/auth/*', (c) => c.json(GONE, 410));
25authProductRetiredRouter.all('/v1/projects/:id/scim/*', (c) => c.json(GONE, 410));
26
27// Phase 7 opens: dashboard, users, roles, sessions, workspace, project config,
28// keys, tenants. Still closed: legacy recipes admin, MFA admin-only helpers,
29// migration bulk (deep enterprise login comes later).
30authProductRetiredRouter.all('/v1/auth-core/recipes', (c) => c.json(GONE, 410));
31authProductRetiredRouter.all('/v1/auth-core/recipes/*', (c) => c.json(GONE, 410));
32authProductRetiredRouter.all('/v1/auth-core/mfa/*', (c) => c.json(GONE, 410));
33authProductRetiredRouter.all('/v1/auth-core/passkeys/*', (c) => c.json(GONE, 410));
34authProductRetiredRouter.all('/v1/auth-core/migration/*', (c) => c.json(GONE, 410));