I found a very easy solution to handle this. Docs: https://clerk.com/docs/references/nextjs/auth
import React from "react";
import { auth } from "@clerk/nextjs/server";
import { getDictionary } from "@/locales/dictionary";
import TenantTable from "@/components/TenantTable/TenantTable";
export default async function Page() {
const dict = await getDictionary();
const { userId, redirectToSignIn } = await auth();
if (!userId) return redirectToSignIn();
return (
<div>
Hello, ${userID}
</div>
);
}