Get current user role
Hello!
Im using NextJS 15 with Kinde auth (love it so far)
I have been looking through older posts about how to get the current users role, but I have not yet succeeded to find a solution.
My goal is to get the role when fetching "getUser" through "getKindeServerSession".
I have made sure to create desired roles and assigned them.
Maybe i have not really understood the concept of how to use roles properly in Kinde Auth, im currently studying front-end dev so sorry if the answer is rather simple
Thanks in advance!
EDIT / ADDITION:
While reading the documentation i see that Kinde recommend controlling access to features on permission-level -> We recommend you use permissions for controlling access to features within your application, then use roles to group the permissions.
But for interest i still would like to know if above is possible.
Im using NextJS 15 with Kinde auth (love it so far)
I have been looking through older posts about how to get the current users role, but I have not yet succeeded to find a solution.
My goal is to get the role when fetching "getUser" through "getKindeServerSession".
I have made sure to create desired roles and assigned them.
Maybe i have not really understood the concept of how to use roles properly in Kinde Auth, im currently studying front-end dev so sorry if the answer is rather simple
Thanks in advance!
EDIT / ADDITION:
While reading the documentation i see that Kinde recommend controlling access to features on permission-level -> We recommend you use permissions for controlling access to features within your application, then use roles to group the permissions.
But for interest i still would like to know if above is possible.