Skip to main content

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

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