Files
reflector/www/app/api/auth/[...nextauth]/route.ts
Sergey Mankovsky f6cc03286b fix: upgrade to nextjs 16 (#888)
* Upgrade to nextjs 16

* Update sentry config

* Force dynamic for health route

* Upgrade eslint config

* Upgrade jest

* Move types to dev dependencies

* Remove pages from tailwind config

* Replace img with next image
2026-02-27 17:18:03 +01:00

15 lines
474 B
TypeScript

import NextAuth from "next-auth";
import { authOptions } from "../../../lib/authBackend";
export const dynamic = "force-dynamic";
// authOptions() is deferred to request time to avoid calling getNextEnvVar
// during Turbopack's build-phase module evaluation (Next.js 16+)
export function GET(req: Request, ctx: any) {
return NextAuth(authOptions())(req as any, ctx);
}
export function POST(req: Request, ctx: any) {
return NextAuth(authOptions())(req as any, ctx);
}