7 lines
No EOL
245 B
TypeScript
7 lines
No EOL
245 B
TypeScript
import { getServerSession } from "next-auth";
|
|
import { authOptions } from "./authOptions";
|
|
|
|
export async function getUserEmail(): Promise<string> {
|
|
const session = await getServerSession(authOptions);
|
|
return session?.user?.email || '';
|
|
} |