mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-23 09:18:30 +00:00
13 lines
300 B
TypeScript
13 lines
300 B
TypeScript
import { unstable_getServerSession } from "next-auth/next"
|
|
|
|
import { authOptions } from "@/lib/auth"
|
|
|
|
export async function getSession() {
|
|
return await unstable_getServerSession(authOptions)
|
|
}
|
|
|
|
export async function getCurrentUser() {
|
|
const session = await getSession()
|
|
|
|
return session?.user
|
|
}
|