From d32260dd85e5fc371edeb69c23e92dcf0318b111 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Wed, 27 Dec 2023 19:55:52 +0100 Subject: [PATCH] fix(imports): :bug: Added missing h3 import for logout handler --- src/runtime/server/handler/logout.get.ts | 2 +- src/runtime/server/lib/oidc.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/server/handler/logout.get.ts b/src/runtime/server/handler/logout.get.ts index cc38fef..4b7ec90 100644 --- a/src/runtime/server/handler/logout.get.ts +++ b/src/runtime/server/handler/logout.get.ts @@ -3,6 +3,6 @@ import { sendRedirect } from 'h3' export default logoutEventHandler({ async onSuccess(event) { - return sendRedirect(event, '/') + return sendRedirect(event, '/', 302) } }) diff --git a/src/runtime/server/lib/oidc.ts b/src/runtime/server/lib/oidc.ts index 2702c41..441b347 100644 --- a/src/runtime/server/lib/oidc.ts +++ b/src/runtime/server/lib/oidc.ts @@ -1,4 +1,4 @@ -import { H3Error, useSession, getRequestHeader, eventHandler, createError, getQuery, sendRedirect, readBody } from 'h3' +import { H3Error, useSession, getRequestHeader, eventHandler, createError, getQuery, sendRedirect, readBody, getRequestURL } from 'h3' import { withQuery, parseURL, normalizeURL } from 'ufo' import { ofetch } from 'ofetch' // @ts-expect-error - Missing types for nitro exports in Nuxt (useStorage)