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 | |
| 7 | import { Hono } from 'hono'; |
| 8 | |
| 9 | import type { AppEnv } from '../types/app-env.js'; |
| 10 | |
| 11 | export const authProductRetiredRouter = new Hono<AppEnv>(); |
| 12 | |
| 13 | const 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 |
| 22 | authProductRetiredRouter.all('/v1/auth-tenant/*', (c) => c.json(GONE, 410)); |
| 23 | authProductRetiredRouter.all('/v1/auth-v2/*', (c) => c.json(GONE, 410)); |
| 24 | authProductRetiredRouter.all('/v1/projects/:id/auth/*', (c) => c.json(GONE, 410)); |
| 25 | authProductRetiredRouter.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). |
| 30 | authProductRetiredRouter.all('/v1/auth-core/recipes', (c) => c.json(GONE, 410)); |
| 31 | authProductRetiredRouter.all('/v1/auth-core/recipes/*', (c) => c.json(GONE, 410)); |
| 32 | authProductRetiredRouter.all('/v1/auth-core/mfa/*', (c) => c.json(GONE, 410)); |
| 33 | authProductRetiredRouter.all('/v1/auth-core/passkeys/*', (c) => c.json(GONE, 410)); |
| 34 | authProductRetiredRouter.all('/v1/auth-core/migration/*', (c) => c.json(GONE, 410)); |