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;}