sarlink-portal/lib/auth-utils.ts
i701 2b0bd515e7 Update package.json for turbopack support, enhance AppSidebar with new icons, and add Textarea and auth-utils components
- Modified the dev script in package.json to use turbopack for improved development performance.
- Enhanced AppSidebar by adding new icons for navigation items, improving visual clarity.
- Introduced a new Textarea component for consistent styling and functionality across forms.
- Added auth-utils module to fetch the current user session, streamlining user authentication processes.
2024-12-01 23:19:21 +05:00

11 lines
230 B
TypeScript

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