From 8643c3dfa7cf81d0c5c08740be649d112be3b027 Mon Sep 17 00:00:00 2001 From: WorkClub Automation Date: Thu, 5 Mar 2026 13:59:16 +0100 Subject: [PATCH] fix(frontend): create NextAuth.js API route handler NextAuth.js v5 requires an explicit API route to expose authentication endpoints. Added missing route handler at frontend/src/app/api/auth/[...nextauth]/route.ts that imports and exports handlers from the auth configuration. This fixes: - /api/auth/signin endpoint (was 404) - /api/auth/callback endpoint - /api/auth/session endpoint - Frontend authentication flow initialization Verification: Endpoint now returns HTTP 200 and frontend loads without ClientFetchError. --- frontend/src/app/api/auth/[...nextauth]/route.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 frontend/src/app/api/auth/[...nextauth]/route.ts diff --git a/frontend/src/app/api/auth/[...nextauth]/route.ts b/frontend/src/app/api/auth/[...nextauth]/route.ts new file mode 100644 index 0000000..29e905e --- /dev/null +++ b/frontend/src/app/api/auth/[...nextauth]/route.ts @@ -0,0 +1,3 @@ +import { handlers } from "@/auth/auth" + +export const { GET, POST } = handlers