Refactor authentication system: replace NextAuth with custom login/logout/session handling, improve cookie management, and enhance error handling
Build and Push Reader Image / docker (push) Successful in 39s

This commit is contained in:
2026-04-24 01:53:32 +07:00
parent 690a2fbd51
commit 7c4404ded8
26 changed files with 368 additions and 239 deletions
+19 -4
View File
@@ -1,6 +1,21 @@
import NextAuth from "next-auth"
import { authOptions } from "@/lib/auth"
import { NextResponse } from "next/server"
const handler = NextAuth(authOptions)
export const runtime = "nodejs"
export const dynamic = "force-dynamic"
export { handler as GET, handler as POST }
function disabled() {
return NextResponse.json(
{
detail: "Legacy NextAuth route is disabled. Use /api/auth/login, /api/auth/session, /api/auth/logout.",
},
{ status: 410 },
)
}
export async function GET() {
return disabled()
}
export async function POST() {
return disabled()
}