"use server"; import { headers } from "next/headers"; import { cache } from "react"; import { auth } from "./auth"; const getCurrentUserCache = cache(async () => { const session = await auth.api.getSession({ headers: await headers(), }); return session?.user; }); export async function getCurrentUser() { return await getCurrentUserCache(); }