RobCipolla
TTCTheo's Typesafe Cult
•Created by RobCipolla on 4/9/2024 in #questions
Clerk and tRPC "protectedProcedures" on the server.
Hey everyone!
I am trying to integrate Clerk into tRPC so I can create protectedProcedures (using create-t3-app). Essentially I need the "auth" object returned by
getAuth
to be part of the ctx.
Now I got this working nicely for client components.
However I am a bit stuck on how I would implement this for server components... I cannot see a way to pass the NextRequest
object into createContext from the createCaller
function.
Any ideas?7 replies