K
Kindeβ€’7mo ago
James

Kinde + tRPC + NextJS app router

has anyone managed to follow the Kinde guide for Kinde+tRPC with NextJS app router? https://kinde.com/blog/engineering/kinde-trpc-nextjs/. I can't see how its come from a working code sample. In route.ts they have this const createContext = async ({req, res}: trpcNext.CreateNextContextOptions) but trpcNext is not imported and in trpc.ts they have export const createTRPCContext = async (opts: { headers: Headers; auth: kindeAuth; }) => { return { db, userId: opts.auth.userId, ...opts, }; }; Where type kindeAuth = ReturnType<typeof getKindeServerSession>>; but there's not such thing as userId on this helper function. There's types imported but not used, extra characters/mis-type in code etc. If anyone knows of a github repo with a working implementation of tRPC and Kinde with NextJS app router, I would be very thankful πŸ™‚ Kinde Blog Kinde x tRPC x Next.js Integrating Kinde auth with tRPC combines Kinde's streamlined authentication with tRPC's type-safe APIs, enhancing security and developer efficiency. This synergy simplifies secure user management and boosts productivity by reducing errors in web application development, making it an ideal solution for creating scalable and maintainable applicat... Kinde x tRPC x Next.js
Kinde Blog
Kinde x tRPC x Next.js
Integrating Kinde auth with tRPC combines Kinde's streamlined authentication with tRPC's type-safe APIs, enhancing security and developer efficiency. This synergy simplifies secure user management and boosts productivity by reducing errors in web application development, making it an ideal solution for creating scalable and maintainable applicat...
4 Replies
CB_Kinde
CB_Kindeβ€’7mo ago
Hi James. Thanks for the feedback. I'll see if one of our team can re-test this set-up and see where things need updating. Other than fixing the doc, is there any way we can help get you past this?
James
JamesOPβ€’7mo ago
Hi Claire, thanks for the update. For now I have just set this aside and moved on without the auth'd tRPC. Hopefully when the doco is updated I can come back again and convert to protected calls. Thanks
Rasel Hossain
Rasel Hossainβ€’2mo ago
Hi James, did you find any solutions? I am encountering the same issue; they did not write the blog correctly
CB_Kinde
CB_Kindeβ€’2mo ago
Hi Rasel. Please be patient as our update backlog is considerable. In fact, I'll take the current blog down as it is incorrect. Until we get to updating it.
Want results from more Discord servers?
Add your server