diff --git a/apps/mail/lib/auth-proxy.ts b/apps/mail/lib/auth-proxy.ts
index f972306e5..253426baa 100644
--- a/apps/mail/lib/auth-proxy.ts
+++ b/apps/mail/lib/auth-proxy.ts
@@ -3,7 +3,9 @@ import { authClient } from './auth-client';
export const authProxy = {
api: {
getSession: async ({ headers }: { headers: Headers }) => {
- const session = await authClient.getSession({ fetchOptions: { headers } });
+ const session = await authClient.getSession({
+ fetchOptions: { headers, credentials: 'include' },
+ });
if (session.error) throw new Error(session.error.message);
return session.data;
},
diff --git a/apps/mail/providers/server-providers.tsx b/apps/mail/providers/server-providers.tsx
index 9f9257432..ee975d162 100644
--- a/apps/mail/providers/server-providers.tsx
+++ b/apps/mail/providers/server-providers.tsx
@@ -8,8 +8,10 @@ import { authProxy } from '@/lib/auth-proxy';
export async function ServerProviders({ children }: PropsWithChildren) {
const messages = await getMessages();
return (
-
- {children}
-
+
+
+ {children}
+
+
);
}