mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
14 lines
372 B
TypeScript
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;
|
|
},
|
|
},
|
|
};
|