Prefertch() privateProcedure (Clerk) in gSSP
Trying to do that I'm getting "UNAUTHORIZED" error.
I see that for creating prefetchHelper I use createInnerTRPCContext without passing auth data to it.
Does it mean that it is impossible to fetch data from privateProcedure using prefetchHelper ?
Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query)
1 Reply
Ah, I needed to pass "auth" from gSSP to prefetchHelper.
Works.