fix: add back clean cookie

This commit is contained in:
Matilda Landström
2024-05-24 15:03:01 +02:00
parent b9c642a35b
commit 6e94d28073

View File

@@ -16,6 +16,12 @@ export async function GET(
let redirectHeaders: Headers | undefined = undefined
let redirectTo: string = ""
// Clean up cookie from authRequired middleware
redirectHeaders = new Headers()
redirectHeaders.append(
"set-cookie",
"redirectTo=; Expires=Thu, 01 Jan 1970 00:00:00 UTC; Path=/; HttpOnly; SameSite=Lax"
)
try {
// Initiate the seamless logout flow
let redirectUrlValue