mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 18:26:34 +02:00
🐛 Fix invalid-session route
This commit is contained in:
parent
44faca3ccf
commit
12651abd0c
1 changed files with 8 additions and 3 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue