From 45b636686130528f14a9a8733a1fec32b66b7a50 Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Fri, 20 Feb 2026 10:13:32 +0100 Subject: [PATCH] Create nextauth route handler exporting GET/POST from auth.ts (task 3.4) --- openspec/changes/user-accounts/tasks.md | 2 +- src/app/api/auth/[...nextauth]/route.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/app/api/auth/[...nextauth]/route.ts diff --git a/openspec/changes/user-accounts/tasks.md b/openspec/changes/user-accounts/tasks.md index f24f284..53a4b27 100644 --- a/openspec/changes/user-accounts/tasks.md +++ b/openspec/changes/user-accounts/tasks.md @@ -17,7 +17,7 @@ - [x] 3.1 `[sonnet]` Create `src/auth.ts` with Auth.js v5 config: JWT strategy, Credentials provider (email/password with bcryptjs verify), Google OAuth provider - [x] 3.2 `[sonnet]` Add JWT callback to embed `user.id` in token and session callback to expose `session.user.id` - [x] 3.3 `[sonnet]` Handle Google OAuth sign-in callback: create user on first sign-in, find existing user on returning sign-in -- [ ] 3.4 `[haiku]` Create `src/app/api/auth/[...nextauth]/route.ts` exporting GET/POST handlers +- [x] 3.4 `[haiku]` Create `src/app/api/auth/[...nextauth]/route.ts` exporting GET/POST handlers ## 4. Registration API diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts new file mode 100644 index 0000000..2e06971 --- /dev/null +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -0,0 +1 @@ +export { GET, POST } from "@/auth";