mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 10:16:32 +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";
|
||||
|
||||
export async function GET() {
|
||||
return await signOut({
|
||||
redirectTo: "/",
|
||||
export async function GET(req: NextRequest) {
|
||||
await signOut({
|
||||
redirect: false,
|
||||
});
|
||||
|
||||
return NextResponse.redirect(new URL("/login", req.url));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue