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