Download src/app/api/auth/logout/route.js from heyeyydss/api9nin: direct link, hf CLI and curl.
- Browser
- Download file 433 Bytes
-
https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/auth/logout/route.js
- Command line
-
hf download hf://spaces/heyeyydss/api9nin/src/app/api/auth/logout/route.js
-
curl -L -o route.js https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/auth/logout/route.js
433 Bytes
| import { NextResponse } from "next/server"; | |
| import { cookies } from "next/headers"; | |
| import { clearDashboardAuthCookie } from "@/lib/auth/dashboardSession"; | |
| export async function POST() { | |
| const cookieStore = await cookies(); | |
| clearDashboardAuthCookie(cookieStore); | |
| cookieStore.delete("oidc_state"); | |
| cookieStore.delete("oidc_nonce"); | |
| cookieStore.delete("oidc_code_verifier"); | |
| return NextResponse.json({ success: true }); | |
| } | |