From 2afe6f385783146ea6415846399573318047911b Mon Sep 17 00:00:00 2001 From: silverbackdan Date: Mon, 23 Dec 2024 19:52:43 +0000 Subject: [PATCH] Include cookie headers on session fetch --- src/runtime/composables/local/useAuth.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/composables/local/useAuth.ts b/src/runtime/composables/local/useAuth.ts index c122262c..5de34730 100644 --- a/src/runtime/composables/local/useAuth.ts +++ b/src/runtime/composables/local/useAuth.ts @@ -10,7 +10,7 @@ import { type UseAuthStateReturn, useAuthState } from './useAuthState' import { callWithNuxt } from '#app/nuxt' // @ts-expect-error - #auth not defined import type { SessionData } from '#auth' -import { navigateTo, nextTick, useNuxtApp, useRoute, useRuntimeConfig } from '#imports' +import { navigateTo, nextTick, useNuxtApp, useRequestHeaders, useRoute, useRuntimeConfig } from '#imports' type Credentials = { username?: string, email?: string, password?: string } & Record @@ -130,7 +130,10 @@ async function getSession(getSessionOptions?: GetSessionOptions): Promise