🐛 Fix invalid-session route

This commit is contained in:
Luke Vella 2025-04-16 19:51:02 +01:00
parent 44faca3ccf
commit 12651abd0c
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C

View file

@ -1,7 +1,12 @@
import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
import { signOut } from "@/next-auth"; import { signOut } from "@/next-auth";
export async function GET() { export async function GET(req: NextRequest) {
return await signOut({ await signOut({
redirectTo: "/", redirect: false,
}); });
return NextResponse.redirect(new URL("/login", req.url));
} }