How to provide more info on ctx.session.user in the routers?
I gave my users a role and would like to have access to it with the context when I do a protectedProcedure.


3 Replies
you have to augment the next auth model
TypeScript | NextAuth.js
NextAuth.js has its own type definitions to use in your TypeScript projects safely. Even if you don't use TypeScript, IDEs like VSCode will pick this up to provide you with a better developer experience. While you are typing, you will get suggestions about what certain objects/functions look like, and sometimes links to documentation, examples, ...
thx!