feat(01-01): configure Auth.js v5 JWT + Credentials, route protection middleware
- Created src/lib/auth.ts with NextAuth JWT strategy, 7-day rolling session, Credentials provider - Created src/app/api/auth/[...nextauth]/route.ts with GET/POST handlers and force-dynamic - Created middleware.ts at project root (not src/) protecting /agent/* routes - Fixed db/index.ts: lazy Proxy singleton prevents neon() crash during Next.js build - npm run build passes; /api/auth/[...nextauth] renders as Dynamic route
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { handlers } from "@/lib/auth";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export const { GET, POST } = handlers;
|
||||
Reference in New Issue
Block a user