How to implement Role Based Authorization in T3?
Hey community,
I am new to the T3 stack and would like to implement role based authorization in my project. To ensure that only authorized users with the admin role can execute certain queries, I have created a new
This works in theory, but somehow the roles of the users are not taken over correctly. My sessionCallback looks like this:
In my admin procedure, however, the role value always remains undefined. Does anyone have any idea what I am doing wrong or what I am missing? Thanks in advance!
I am new to the T3 stack and would like to implement role based authorization in my project. To ensure that only authorized users with the admin role can execute certain queries, I have created a new
adminProcedure:This works in theory, but somehow the roles of the users are not taken over correctly. My sessionCallback looks like this:
In my admin procedure, however, the role value always remains undefined. Does anyone have any idea what I am doing wrong or what I am missing? Thanks in advance!