buildClerkProps
Clerk uses buildClerkProps
to inform the client-side helpers of the authentication state of the user. This function is used SSR in the getServerSideProps
function of your Next.js application.
Usage
Basic usage
Protecting pages using SSR
It is important to protect your API routes to ensure that only authenticated users can access them. You can do this by checking if the userId
is present in the getAuth()
response.
Usage with clerkClient
The clerkClient
allows you to access the Clerk API. You can use this to retrieve or update data.
Feedback
Last updated on