Skip to main content

List all roles

You can fetch all the roles that you have created

import UserRoles from "supertokens-node/recipe/userroles";

async function getAllRoles() {
const roles: string[] = (await UserRoles.getAllRoles()).roles;
}
Which frontend SDK do you use?
supertokens-web-js / mobile
supertokens-auth-react