Files
Zero/apps/mail/lib/auth-proxy.ts
BlankParticle f94c109bee fix: fix autumn
2025-05-09 08:23:20 +05:30

14 lines
372 B
TypeScript

import { authClient } from './auth-client';
export const authProxy = {
api: {
getSession: async ({ headers }: { headers: Headers }) => {
const session = await authClient.getSession({
fetchOptions: { headers, credentials: 'include' },
});
if (session.error) throw new Error(session.error.message);
return session.data;
},
},
};