News for hackers. Stuff that matters.
Re:GraphJin – GraphQL to SQL Compiler by rlili on Wednesday June 01, 2022 @04:14PM (#31587405)
You don't necessarily have to put those claims into a JWT (other than the user ID). You can just store the "XYZ" that the user has into a table.
Re:GraphJin – GraphQL to SQL Compiler by burggraf on Wednesday June 01, 2022 @05:55PM (#31588649)
That is definitely true (and probably easier than doing custom claims), but the reason I use claims is that it saves doing a join against that extra table inside your RLS policies, which can sometimes have a big performance impact. Those claims are also available on the client side, too, saving a round trip to the server if you need to check the claims.