How can we allow multiple user roles to access a particular API? In case we want an API to be access...
n
How can we allow multiple user roles to access a particular API? In case we want an API to be accessed by SuperAdmin along with Admin, what needs to be added in the verify_session? @verify_session( # We add the UserRoleClaim's includes validator override_global_claim_validators=lambda global_validators, session, user_context: global_validators + \ [UserRoleClaim.validators.includes("admin")] )
r
hey @namanchhabra_60978 if you want to do an OR condition, checkout the second code snippet in this page: https://supertokens.com/docs/userroles/protecting-routes
2 Views