Skip to main content

If you are using our backend SDK that is lesser than the following versions, please visit the older documentation link here.

Deleting roles

You can delete any role you have created, if the role you are trying to delete does not exist then this has no effect

tip

You can also delete roles from the user management dashboard. To know more about how to manage your user roles and permissions from user management dashboard see this page

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

async function deleteRole() {
// Delete the user role
const response = await UserRoles.deleteRole("user");

if (!response.didRoleExist) {
// There was no such role
}
}
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI