[NEED HELP] Try to use permissions with roles #8850
-
Hello, I have a problem with permissions with roles. I have entities like
The tables for the roles are:
I use JWT tokens as authentication. 1. My first solution, and the one I would like to implement.The role verification will be done like this: All users have the The problem is that I would like to filter the fields returned according to the role, (for example, for the role 2. Second solution, use the roles in Hasura and in the databaseIf I declare roles in hasura, like
And I send the role through the header:
And I check in database as well. 3. I store everything in the JWT (worse case)
The JWT can do several megabytes. ConclusionDo you have better solutions or tips to solve my problems? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think second solution will be the way to go. |
Beta Was this translation helpful? Give feedback.
I think second solution will be the way to go.