tRPC + Clerk: user & org info
I'm switching from NextAuth to Clerk. With NextAuth, I got the user info like:
With Clerk's
I can retrieve it like this, but it'd be called too many times and retrieve too much data
tRPC setup: t3 then https://clerk.com/docs/nextjs/trpc
With Clerk's
getAuth, I only get userId and nothing else about the user. It exists in the SignedInAuthObject type but it's always undefined, so I can't read the user's email or orgSlug in my tRPC context.I can retrieve it like this, but it'd be called too many times and retrieve too much data
tRPC setup: t3 then https://clerk.com/docs/nextjs/trpc
Learn how to integrate Clerk into your Next.js with TRPC
