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)