mirror of https://github.com/MaxLeiter/Drift
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
292 B
TypeScript
13 lines
292 B
TypeScript
import { unstable_getServerSession } from "next-auth/next"
|
|
import { authOptions } from "./auth"
|
|
|
|
export async function getSession() {
|
|
return await unstable_getServerSession(authOptions)
|
|
}
|
|
|
|
export async function getCurrentUser() {
|
|
const session = await getSession()
|
|
|
|
return session?.user
|
|
}
|