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
12import { brivenEngineNextHandler } from '@briven/auth/engine/proxy';
13
14const 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
21export const GET = handler;
22export const POST = handler;
23export const PUT = handler;
24export const PATCH = handler;
25export const DELETE = handler;