🚸 ux: improve logout flow completely
This commit is contained in:
7
app/(safe-mode-page)/auth/logout/route.tsx
Normal file
7
app/(safe-mode-page)/auth/logout/route.tsx
Normal file
@ -0,0 +1,7 @@
|
||||
import { cookies } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export const GET = async (request: Request) => {
|
||||
(await cookies()).delete("auth_token");
|
||||
return NextResponse.redirect(new URL("/", request.url), 303);
|
||||
};
|
||||
Reference in New Issue
Block a user