pineappaul
Explore posts from serversTTCTheo's Typesafe Cult
•Created by pineappaul on 11/14/2023 in #questions
TRPC NextJS Context - Middleware Reload?
Howdy! We know the beloved T3 stack with
Thank you kindly.
app
directory is now a streamlined thing, but there's a peculiarity with Clerk and TRPC.
After signing in with Clerk, authenticated requests can only be made to the TRPC server after the user refreshes the page.
Once the page is refreshed, authenticated requests to protected procedures work just fine.
Reckon this is due to the root layout not re-running on the server, but could be totally off base there. Happy to open a thread and provide the actual implementation of the middleware as grabbed directly from the Next13 starter!Thank you kindly.
13 replies