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;
}
Looking for older version of the documentation?
Which UI do you use?
Custom UI
Pre built UI