13 lines
266 B
TypeScript
13 lines
266 B
TypeScript
import { auth } from "@kk/auth";
|
|
|
|
export async function createContext({ req }: { req: Request }) {
|
|
const session = await auth.api.getSession({
|
|
headers: req.headers,
|
|
});
|
|
return {
|
|
session,
|
|
};
|
|
}
|
|
|
|
export type Context = Awaited<ReturnType<typeof createContext>>;
|