Clerk Context in TRPC
I used create t3 app to create an app and have added clerk according to their docs to the app. i tried adding it to the trpc context like the first picture attached and that worked great. i was able to create a protectedProcedure. But now i am getting an error in server.ts (/server/trpc/server.ts) that i cant call createTRPCContext because I only have the headers there (2nd picture attached). Please lmk if that is a noob question because it seems trivial but I somehow can't figure it out.
Solution:Jump to solution
Hi @LukasGaeb , I too had struggle when using the latest T3 app with clerk and this is the current change that I have now and works perfectly fine.
4 Replies
sorry forgot to post the second pic
Solution
Hi @LukasGaeb , I too had struggle when using the latest T3 app with clerk and this is the current change that I have now and works perfectly fine.
awesome thanks!