entropy
Issue with trpc fetch when trying to pass Clerk auth to context
Uh I mean really depends on what you need but I would say compared to Clerk that next-auth is a bit harder to setup. I found this github really quickly if you want to take a peak at their implementation. Otherwise I would wait for someone more knowledgeable to help out.
https://github.com/solaldunckel/next-13-app-router-with-trpc
53 replies
Issue with trpc fetch when trying to pass Clerk auth to context
They actually have a guide that can help you setup tRPC with Clerk here that I'd recommend following.
https://clerk.com/docs/references/nextjs/trpc
53 replies
Issue with trpc fetch when trying to pass Clerk auth to context
you just need to add your api to your public routes on the Clerk middleware so:
Though if you are following the Clerk docs and use the matcher they have it should prevent your middleware from running on
/trpc
or /api
endpoints
53 replies
Issue with trpc fetch when trying to pass Clerk auth to context
I see thank you for the information! It turns out that Clerk will send everything to the sign in page including api's so I just had to add my api route for trpc to my clerk middleware public routes.
53 replies
Issue with trpc fetch when trying to pass Clerk auth to context
here's a link to a repo with the same issue as well:
https://github.com/Entropy-10/clerk-trpc-issue
53 replies