Role based Authentication Question
I was looking to have an isAdmin middleware like option 2 here: https://trpc.io/docs/authorization
However, my "role" field that isn't available in my context. How do I add it to my context? Sorry if thats a dumb q im new lol
However, my "role" field that isn't available in my context. How do I add it to my context? Sorry if thats a dumb q im new lol
The createContext function is called for each incoming request, so here you can add contextual information about the calling user from the request object.
