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
}
}
Which UI do you use?
Custom UI
Pre built UI