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
๐Ÿง™โ€โ™€๏ธ 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...
Was this page helpful?