tRPCttRPC
Powered by
Michael SchaufelbergerM
tRPCโ€ข2y agoโ€ข
23 replies
Michael Schaufelberger

How do I use the rsc-rq-prefetch example with a protected procedure?

Thank you for this implementation! It looks sooo promising ๐Ÿ˜€

However, I ran into an issue when trying it out:

https://github.com/trpc/trpc/blob/next/examples/.experimental/next-app-dir/src/app/rsc-rq-prefetch/page.tsx

If we have a protected procedure instead of a public one, the server is not authenticated during SSR and an error is thrown.
How can we solve this? Can we just ignore the error and will it still work?
GitHub
trpc/examples/.experimental/next-app-dir/src/app/rsc-rq-prefetch/pa...
๐Ÿง™โ€โ™€๏ธ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. - trpc/trpc
trpc/examples/.experimental/next-app-dir/src/app/rsc-rq-prefetch/pa...
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Example for tRPC, stable version, with RSC
Michael SchaufelbergerMMichael Schaufelberger / โ“-help
3y ago
How do I prefetch the nextPage of an infiniteQuery?
ygor perezYygor perez / โ“-help
3y ago
How do you call a router procedure from another router procedure?
chicoCchico / โ“-help
2y ago
Unauthorized Error while prefetching from protected procedure
RodeoSpriteRRodeoSprite / โ“-help
3mo ago