James
James
KKinde
Created by James on 5/28/2024 in #💻┃support
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
7 replies