taxonomy/lib/session.ts
2023-04-24 15:10:49 +04:00

9 lines
214 B
TypeScript

import { getServerSession } from "next-auth/next"
import { authOptions } from "@/lib/auth"
export async function getCurrentUser() {
const session = await getServerSession(authOptions)
return session?.user
}