@clerk/nextjs
Version:
Clerk SDK for NextJS
15 lines • 372 B
JavaScript
import "../../chunk-BUSYA2B4.js";
import { clerkClient } from "../../server/clerkClient";
import { auth } from "./auth";
async function currentUser() {
require("server-only");
const { userId } = await auth();
if (!userId) {
return null;
}
return (await clerkClient()).users.getUser(userId);
}
export {
currentUser
};
//# sourceMappingURL=currentUser.js.map