Storing additional data in Server Auth Session

I have some DB data (user profile) that I'd like to store alongside session and user in Server Auth Session so I can check for it in middleware. How do you do that? I would like to fetch it with Prisma.
1 Reply
Vincent Udén
Vincent Udén17mo ago
Use the next auth callbacks to insert your own data https://next-auth.js.org/configuration/callbacks
Callbacks | NextAuth.js
Callbacks are asynchronous functions you can use to control what happens when an action is performed.
Want results from more Discord servers?
Add your server