How to write @auth incase of user role claim in JWT has a array format

You are probably looking for this syntax:

Basically use the in logic. Which I believe from this discussions can be used with the array being the array from a JWT or from a static array in the rule:

{ $SINGLE_ROLE: { in:  [\"USER\", \"ADMIN\"] } }
{ \"ADMIN\": { in: $ROLE_ARRAY } }
1 Like