Does anyone have any examples on how to declare global user context from database with t3 stack?

I know I can get the session from next-auth with useSession() but I need a way to get current user ID from the database. useSession() is not connected to the database.
3 Replies
theFern
theFernOP2y ago
Should this be done with a protectedProcedure using tRPC middleware? If so, any examples using Prisma?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
theFern
theFernOP2y ago
Thanks so much! I'll take a look
Want results from more Discord servers?
Add your server