route.ts25 lines · main
| 1 | /** |
| 2 | * First-party briven-engine proxy (Step 4). |
| 3 | * |
| 4 | * Browser → https://briven.tech/api/auth/* (same site as the app) |
| 5 | * → https://api.briven.tech/v1/auth-core/fdi/* |
| 6 | * |
| 7 | * Cookies (Set-Cookie) are written for the **app** host, not a foreign API host. |
| 8 | * |
| 9 | * Not production Auth for customers until flndrn OKs deploy of the full product. |
| 10 | */ |
| 11 | |
| 12 | import { brivenEngineNextHandler } from '@briven/auth/engine/proxy'; |
| 13 | |
| 14 | const handler = brivenEngineNextHandler({ |
| 15 | apiOrigin: |
| 16 | process.env.BRIVEN_API_ORIGIN ?? |
| 17 | process.env.NEXT_PUBLIC_BRIVEN_API_ORIGIN ?? |
| 18 | 'https://api.briven.tech', |
| 19 | }); |
| 20 | |
| 21 | export const GET = handler; |
| 22 | export const POST = handler; |
| 23 | export const PUT = handler; |
| 24 | export const PATCH = handler; |
| 25 | export const DELETE = handler; |